stream_buffer.c.017i.build_ssa_passes 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948
  1. ucStreamBufferGetStreamBufferType (struct StreamBufferDef_t * xStreamBuffer)
  2. {
  3. uint8_t D.6586;
  4. <bb 2> :
  5. # DEBUG BEGIN_STMT
  6. _1 = xStreamBuffer->ucFlags;
  7. D.6586 = _1 & 1;
  8. return D.6586;
  9. }
  10. vStreamBufferSetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer, UBaseType_t uxStreamBufferNumber)
  11. {
  12. <bb 2> :
  13. # DEBUG BEGIN_STMT
  14. xStreamBuffer->uxStreamBufferNumber = uxStreamBufferNumber;
  15. return;
  16. }
  17. uxStreamBufferGetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer)
  18. {
  19. UBaseType_t D.6584;
  20. <bb 2> :
  21. # DEBUG BEGIN_STMT
  22. D.6584 = xStreamBuffer->uxStreamBufferNumber;
  23. return D.6584;
  24. }
  25. prvInitialiseNewStreamBuffer (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
  26. {
  27. const BaseType_t xWriteValue;
  28. <bb 2> :
  29. # DEBUG BEGIN_STMT
  30. xWriteValue = 85;
  31. # DEBUG BEGIN_STMT
  32. _1 = memset (pucBuffer, 85, xBufferSizeBytes);
  33. if (pucBuffer != _1)
  34. goto <bb 3>; [INV]
  35. else
  36. goto <bb 5>; [INV]
  37. <bb 3> :
  38. # DEBUG BEGIN_STMT
  39. vPortRaiseBASEPRI ();
  40. <bb 4> :
  41. # DEBUG BEGIN_STMT
  42. # DEBUG BEGIN_STMT
  43. # DEBUG BEGIN_STMT
  44. goto <bb 4>; [INV]
  45. <bb 5> :
  46. # DEBUG BEGIN_STMT
  47. # DEBUG BEGIN_STMT
  48. memset (pxStreamBuffer, 0, 36);
  49. # DEBUG BEGIN_STMT
  50. pxStreamBuffer->pucBuffer = pucBuffer;
  51. # DEBUG BEGIN_STMT
  52. pxStreamBuffer->xLength = xBufferSizeBytes;
  53. # DEBUG BEGIN_STMT
  54. pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes;
  55. # DEBUG BEGIN_STMT
  56. pxStreamBuffer->ucFlags = ucFlags;
  57. return;
  58. }
  59. prvBytesInBuffer (const struct StreamBuffer_t * const pxStreamBuffer)
  60. {
  61. size_t xCount;
  62. size_t D.6389;
  63. unsigned int D.6385;
  64. <bb 2> :
  65. # DEBUG BEGIN_STMT
  66. # DEBUG BEGIN_STMT
  67. _1 = pxStreamBuffer->xLength;
  68. _2 = pxStreamBuffer->xHead;
  69. xCount = _1 + _2;
  70. # DEBUG BEGIN_STMT
  71. D.6385 = pxStreamBuffer->xTail;
  72. xCount = xCount - D.6385;
  73. # DEBUG BEGIN_STMT
  74. _3 = pxStreamBuffer->xLength;
  75. if (xCount >= _3)
  76. goto <bb 3>; [INV]
  77. else
  78. goto <bb 4>; [INV]
  79. <bb 3> :
  80. # DEBUG BEGIN_STMT
  81. _4 = pxStreamBuffer->xLength;
  82. xCount = xCount - _4;
  83. <bb 4> :
  84. # DEBUG BEGIN_STMT
  85. # DEBUG BEGIN_STMT
  86. D.6389 = xCount;
  87. return D.6389;
  88. }
  89. prvReadBytesFromBuffer (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
  90. {
  91. size_t xFirstLength;
  92. size_t D.6521;
  93. <bb 2> :
  94. # DEBUG BEGIN_STMT
  95. # DEBUG BEGIN_STMT
  96. if (xCount == 0)
  97. goto <bb 3>; [INV]
  98. else
  99. goto <bb 5>; [INV]
  100. <bb 3> :
  101. # DEBUG BEGIN_STMT
  102. vPortRaiseBASEPRI ();
  103. <bb 4> :
  104. # DEBUG BEGIN_STMT
  105. # DEBUG BEGIN_STMT
  106. # DEBUG BEGIN_STMT
  107. goto <bb 4>; [INV]
  108. <bb 5> :
  109. # DEBUG BEGIN_STMT
  110. # DEBUG BEGIN_STMT
  111. _1 = pxStreamBuffer->xLength;
  112. _2 = _1 - xTail;
  113. xFirstLength = MIN_EXPR <xCount, _2>;
  114. # DEBUG BEGIN_STMT
  115. if (xFirstLength > xCount)
  116. goto <bb 6>; [INV]
  117. else
  118. goto <bb 8>; [INV]
  119. <bb 6> :
  120. # DEBUG BEGIN_STMT
  121. vPortRaiseBASEPRI ();
  122. <bb 7> :
  123. # DEBUG BEGIN_STMT
  124. # DEBUG BEGIN_STMT
  125. # DEBUG BEGIN_STMT
  126. goto <bb 7>; [INV]
  127. <bb 8> :
  128. # DEBUG BEGIN_STMT
  129. # DEBUG BEGIN_STMT
  130. _3 = xTail + xFirstLength;
  131. _4 = pxStreamBuffer->xLength;
  132. if (_3 > _4)
  133. goto <bb 9>; [INV]
  134. else
  135. goto <bb 11>; [INV]
  136. <bb 9> :
  137. # DEBUG BEGIN_STMT
  138. vPortRaiseBASEPRI ();
  139. <bb 10> :
  140. # DEBUG BEGIN_STMT
  141. # DEBUG BEGIN_STMT
  142. # DEBUG BEGIN_STMT
  143. goto <bb 10>; [INV]
  144. <bb 11> :
  145. # DEBUG BEGIN_STMT
  146. # DEBUG BEGIN_STMT
  147. _5 = pxStreamBuffer->pucBuffer;
  148. _6 = _5 + xTail;
  149. memcpy (pucData, _6, xFirstLength);
  150. # DEBUG BEGIN_STMT
  151. if (xCount > xFirstLength)
  152. goto <bb 12>; [INV]
  153. else
  154. goto <bb 13>; [INV]
  155. <bb 12> :
  156. # DEBUG BEGIN_STMT
  157. _7 = pucData + xFirstLength;
  158. _8 = pxStreamBuffer->pucBuffer;
  159. _9 = xCount - xFirstLength;
  160. memcpy (_7, _8, _9);
  161. <bb 13> :
  162. # DEBUG BEGIN_STMT
  163. # DEBUG BEGIN_STMT
  164. xTail = xTail + xCount;
  165. # DEBUG BEGIN_STMT
  166. _10 = pxStreamBuffer->xLength;
  167. if (xTail >= _10)
  168. goto <bb 14>; [INV]
  169. else
  170. goto <bb 15>; [INV]
  171. <bb 14> :
  172. # DEBUG BEGIN_STMT
  173. _11 = pxStreamBuffer->xLength;
  174. xTail = xTail - _11;
  175. <bb 15> :
  176. # DEBUG BEGIN_STMT
  177. D.6521 = xTail;
  178. return D.6521;
  179. }
  180. prvWriteBytesToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
  181. {
  182. size_t xFirstLength;
  183. size_t D.6450;
  184. <bb 2> :
  185. # DEBUG BEGIN_STMT
  186. # DEBUG BEGIN_STMT
  187. if (xCount == 0)
  188. goto <bb 3>; [INV]
  189. else
  190. goto <bb 5>; [INV]
  191. <bb 3> :
  192. # DEBUG BEGIN_STMT
  193. vPortRaiseBASEPRI ();
  194. <bb 4> :
  195. # DEBUG BEGIN_STMT
  196. # DEBUG BEGIN_STMT
  197. # DEBUG BEGIN_STMT
  198. goto <bb 4>; [INV]
  199. <bb 5> :
  200. # DEBUG BEGIN_STMT
  201. # DEBUG BEGIN_STMT
  202. _1 = pxStreamBuffer->xLength;
  203. _2 = _1 - xHead;
  204. xFirstLength = MIN_EXPR <xCount, _2>;
  205. # DEBUG BEGIN_STMT
  206. _3 = xHead + xFirstLength;
  207. _4 = pxStreamBuffer->xLength;
  208. if (_3 > _4)
  209. goto <bb 6>; [INV]
  210. else
  211. goto <bb 8>; [INV]
  212. <bb 6> :
  213. # DEBUG BEGIN_STMT
  214. vPortRaiseBASEPRI ();
  215. <bb 7> :
  216. # DEBUG BEGIN_STMT
  217. # DEBUG BEGIN_STMT
  218. # DEBUG BEGIN_STMT
  219. goto <bb 7>; [INV]
  220. <bb 8> :
  221. # DEBUG BEGIN_STMT
  222. # DEBUG BEGIN_STMT
  223. _5 = pxStreamBuffer->pucBuffer;
  224. _6 = _5 + xHead;
  225. memcpy (_6, pucData, xFirstLength);
  226. # DEBUG BEGIN_STMT
  227. if (xCount > xFirstLength)
  228. goto <bb 9>; [INV]
  229. else
  230. goto <bb 13>; [INV]
  231. <bb 9> :
  232. # DEBUG BEGIN_STMT
  233. _7 = xCount - xFirstLength;
  234. _8 = pxStreamBuffer->xLength;
  235. if (_7 > _8)
  236. goto <bb 10>; [INV]
  237. else
  238. goto <bb 12>; [INV]
  239. <bb 10> :
  240. # DEBUG BEGIN_STMT
  241. vPortRaiseBASEPRI ();
  242. <bb 11> :
  243. # DEBUG BEGIN_STMT
  244. # DEBUG BEGIN_STMT
  245. # DEBUG BEGIN_STMT
  246. goto <bb 11>; [INV]
  247. <bb 12> :
  248. # DEBUG BEGIN_STMT
  249. # DEBUG BEGIN_STMT
  250. _9 = pxStreamBuffer->pucBuffer;
  251. _10 = pucData + xFirstLength;
  252. _11 = xCount - xFirstLength;
  253. memcpy (_9, _10, _11);
  254. <bb 13> :
  255. # DEBUG BEGIN_STMT
  256. # DEBUG BEGIN_STMT
  257. xHead = xHead + xCount;
  258. # DEBUG BEGIN_STMT
  259. _12 = pxStreamBuffer->xLength;
  260. if (xHead >= _12)
  261. goto <bb 14>; [INV]
  262. else
  263. goto <bb 15>; [INV]
  264. <bb 14> :
  265. # DEBUG BEGIN_STMT
  266. _13 = pxStreamBuffer->xLength;
  267. xHead = xHead - _13;
  268. <bb 15> :
  269. # DEBUG BEGIN_STMT
  270. # DEBUG BEGIN_STMT
  271. D.6450 = xHead;
  272. return D.6450;
  273. }
  274. xStreamBufferReceiveCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  275. {
  276. UBaseType_t uxSavedInterruptStatus;
  277. BaseType_t xReturn;
  278. struct StreamBuffer_t * const pxStreamBuffer;
  279. BaseType_t D.6582;
  280. <bb 2> :
  281. # DEBUG BEGIN_STMT
  282. pxStreamBuffer = xStreamBuffer;
  283. # DEBUG BEGIN_STMT
  284. # DEBUG BEGIN_STMT
  285. # DEBUG BEGIN_STMT
  286. if (pxStreamBuffer == 0B)
  287. goto <bb 3>; [INV]
  288. else
  289. goto <bb 5>; [INV]
  290. <bb 3> :
  291. # DEBUG BEGIN_STMT
  292. vPortRaiseBASEPRI ();
  293. <bb 4> :
  294. # DEBUG BEGIN_STMT
  295. # DEBUG BEGIN_STMT
  296. # DEBUG BEGIN_STMT
  297. goto <bb 4>; [INV]
  298. <bb 5> :
  299. # DEBUG BEGIN_STMT
  300. # DEBUG BEGIN_STMT
  301. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  302. # DEBUG BEGIN_STMT
  303. _1 = pxStreamBuffer->xTaskWaitingToSend;
  304. if (_1 != 0B)
  305. goto <bb 6>; [INV]
  306. else
  307. goto <bb 7>; [INV]
  308. <bb 6> :
  309. # DEBUG BEGIN_STMT
  310. _2 = pxStreamBuffer->xTaskWaitingToSend;
  311. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken);
  312. # DEBUG BEGIN_STMT
  313. pxStreamBuffer->xTaskWaitingToSend = 0B;
  314. # DEBUG BEGIN_STMT
  315. xReturn = 1;
  316. goto <bb 8>; [INV]
  317. <bb 7> :
  318. # DEBUG BEGIN_STMT
  319. xReturn = 0;
  320. <bb 8> :
  321. # DEBUG BEGIN_STMT
  322. vPortSetBASEPRI (uxSavedInterruptStatus);
  323. # DEBUG BEGIN_STMT
  324. D.6582 = xReturn;
  325. return D.6582;
  326. }
  327. xStreamBufferSendCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  328. {
  329. UBaseType_t uxSavedInterruptStatus;
  330. BaseType_t xReturn;
  331. struct StreamBuffer_t * const pxStreamBuffer;
  332. BaseType_t D.6575;
  333. <bb 2> :
  334. # DEBUG BEGIN_STMT
  335. pxStreamBuffer = xStreamBuffer;
  336. # DEBUG BEGIN_STMT
  337. # DEBUG BEGIN_STMT
  338. # DEBUG BEGIN_STMT
  339. if (pxStreamBuffer == 0B)
  340. goto <bb 3>; [INV]
  341. else
  342. goto <bb 5>; [INV]
  343. <bb 3> :
  344. # DEBUG BEGIN_STMT
  345. vPortRaiseBASEPRI ();
  346. <bb 4> :
  347. # DEBUG BEGIN_STMT
  348. # DEBUG BEGIN_STMT
  349. # DEBUG BEGIN_STMT
  350. goto <bb 4>; [INV]
  351. <bb 5> :
  352. # DEBUG BEGIN_STMT
  353. # DEBUG BEGIN_STMT
  354. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  355. # DEBUG BEGIN_STMT
  356. _1 = pxStreamBuffer->xTaskWaitingToReceive;
  357. if (_1 != 0B)
  358. goto <bb 6>; [INV]
  359. else
  360. goto <bb 7>; [INV]
  361. <bb 6> :
  362. # DEBUG BEGIN_STMT
  363. _2 = pxStreamBuffer->xTaskWaitingToReceive;
  364. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken);
  365. # DEBUG BEGIN_STMT
  366. pxStreamBuffer->xTaskWaitingToReceive = 0B;
  367. # DEBUG BEGIN_STMT
  368. xReturn = 1;
  369. goto <bb 8>; [INV]
  370. <bb 7> :
  371. # DEBUG BEGIN_STMT
  372. xReturn = 0;
  373. <bb 8> :
  374. # DEBUG BEGIN_STMT
  375. vPortSetBASEPRI (uxSavedInterruptStatus);
  376. # DEBUG BEGIN_STMT
  377. D.6575 = xReturn;
  378. return D.6575;
  379. }
  380. xStreamBufferIsFull (struct StreamBufferDef_t * xStreamBuffer)
  381. {
  382. const struct StreamBuffer_t * const pxStreamBuffer;
  383. size_t xBytesToStoreMessageLength;
  384. BaseType_t xReturn;
  385. BaseType_t D.6568;
  386. <bb 2> :
  387. # DEBUG BEGIN_STMT
  388. # DEBUG BEGIN_STMT
  389. # DEBUG BEGIN_STMT
  390. pxStreamBuffer = xStreamBuffer;
  391. # DEBUG BEGIN_STMT
  392. if (pxStreamBuffer == 0B)
  393. goto <bb 3>; [INV]
  394. else
  395. goto <bb 5>; [INV]
  396. <bb 3> :
  397. # DEBUG BEGIN_STMT
  398. vPortRaiseBASEPRI ();
  399. <bb 4> :
  400. # DEBUG BEGIN_STMT
  401. # DEBUG BEGIN_STMT
  402. # DEBUG BEGIN_STMT
  403. goto <bb 4>; [INV]
  404. <bb 5> :
  405. # DEBUG BEGIN_STMT
  406. # DEBUG BEGIN_STMT
  407. _1 = pxStreamBuffer->ucFlags;
  408. _2 = (int) _1;
  409. _3 = _2 & 1;
  410. if (_3 != 0)
  411. goto <bb 6>; [INV]
  412. else
  413. goto <bb 7>; [INV]
  414. <bb 6> :
  415. # DEBUG BEGIN_STMT
  416. xBytesToStoreMessageLength = 4;
  417. goto <bb 8>; [INV]
  418. <bb 7> :
  419. # DEBUG BEGIN_STMT
  420. xBytesToStoreMessageLength = 0;
  421. <bb 8> :
  422. # DEBUG BEGIN_STMT
  423. _4 = xStreamBufferSpacesAvailable (xStreamBuffer);
  424. if (xBytesToStoreMessageLength >= _4)
  425. goto <bb 9>; [INV]
  426. else
  427. goto <bb 10>; [INV]
  428. <bb 9> :
  429. # DEBUG BEGIN_STMT
  430. xReturn = 1;
  431. goto <bb 11>; [INV]
  432. <bb 10> :
  433. # DEBUG BEGIN_STMT
  434. xReturn = 0;
  435. <bb 11> :
  436. # DEBUG BEGIN_STMT
  437. D.6568 = xReturn;
  438. return D.6568;
  439. }
  440. xStreamBufferIsEmpty (struct StreamBufferDef_t * xStreamBuffer)
  441. {
  442. size_t xTail;
  443. BaseType_t xReturn;
  444. const struct StreamBuffer_t * const pxStreamBuffer;
  445. BaseType_t D.6558;
  446. <bb 2> :
  447. # DEBUG BEGIN_STMT
  448. pxStreamBuffer = xStreamBuffer;
  449. # DEBUG BEGIN_STMT
  450. # DEBUG BEGIN_STMT
  451. # DEBUG BEGIN_STMT
  452. if (pxStreamBuffer == 0B)
  453. goto <bb 3>; [INV]
  454. else
  455. goto <bb 5>; [INV]
  456. <bb 3> :
  457. # DEBUG BEGIN_STMT
  458. vPortRaiseBASEPRI ();
  459. <bb 4> :
  460. # DEBUG BEGIN_STMT
  461. # DEBUG BEGIN_STMT
  462. # DEBUG BEGIN_STMT
  463. goto <bb 4>; [INV]
  464. <bb 5> :
  465. # DEBUG BEGIN_STMT
  466. # DEBUG BEGIN_STMT
  467. xTail = pxStreamBuffer->xTail;
  468. # DEBUG BEGIN_STMT
  469. _1 = pxStreamBuffer->xHead;
  470. if (xTail == _1)
  471. goto <bb 6>; [INV]
  472. else
  473. goto <bb 7>; [INV]
  474. <bb 6> :
  475. # DEBUG BEGIN_STMT
  476. xReturn = 1;
  477. goto <bb 8>; [INV]
  478. <bb 7> :
  479. # DEBUG BEGIN_STMT
  480. xReturn = 0;
  481. <bb 8> :
  482. # DEBUG BEGIN_STMT
  483. D.6558 = xReturn;
  484. return D.6558;
  485. }
  486. prvReadMessageFromBuffer (struct StreamBuffer_t * pxStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable)
  487. {
  488. size_t xNextTail;
  489. size_t xTempNextMessageLength;
  490. size_t xNextMessageLength;
  491. size_t xCount;
  492. size_t D.6507;
  493. <bb 2> :
  494. # DEBUG BEGIN_STMT
  495. # DEBUG BEGIN_STMT
  496. # DEBUG BEGIN_STMT
  497. xNextTail = pxStreamBuffer->xTail;
  498. # DEBUG BEGIN_STMT
  499. _1 = pxStreamBuffer->ucFlags;
  500. _2 = (int) _1;
  501. _3 = _2 & 1;
  502. if (_3 != 0)
  503. goto <bb 3>; [INV]
  504. else
  505. goto <bb 5>; [INV]
  506. <bb 3> :
  507. # DEBUG BEGIN_STMT
  508. xNextTail = prvReadBytesFromBuffer (pxStreamBuffer, &xTempNextMessageLength, 4, xNextTail);
  509. # DEBUG BEGIN_STMT
  510. xNextMessageLength = xTempNextMessageLength;
  511. # DEBUG BEGIN_STMT
  512. xBytesAvailable = xBytesAvailable + 4294967292;
  513. # DEBUG BEGIN_STMT
  514. if (xNextMessageLength > xBufferLengthBytes)
  515. goto <bb 4>; [INV]
  516. else
  517. goto <bb 6>; [INV]
  518. <bb 4> :
  519. # DEBUG BEGIN_STMT
  520. xNextMessageLength = 0;
  521. goto <bb 6>; [INV]
  522. <bb 5> :
  523. # DEBUG BEGIN_STMT
  524. xNextMessageLength = xBufferLengthBytes;
  525. <bb 6> :
  526. # DEBUG BEGIN_STMT
  527. xCount = MIN_EXPR <xBytesAvailable, xNextMessageLength>;
  528. # DEBUG BEGIN_STMT
  529. if (xCount != 0)
  530. goto <bb 7>; [INV]
  531. else
  532. goto <bb 8>; [INV]
  533. <bb 7> :
  534. # DEBUG BEGIN_STMT
  535. _4 = prvReadBytesFromBuffer (pxStreamBuffer, pvRxData, xCount, xNextTail);
  536. pxStreamBuffer->xTail = _4;
  537. <bb 8> :
  538. # DEBUG BEGIN_STMT
  539. D.6507 = xCount;
  540. xTempNextMessageLength = {CLOBBER};
  541. return D.6507;
  542. }
  543. xStreamBufferReceiveFromISR (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  544. {
  545. UBaseType_t uxSavedInterruptStatus;
  546. size_t xBytesToStoreMessageLength;
  547. size_t xBytesAvailable;
  548. size_t xReceivedLength;
  549. struct StreamBuffer_t * const pxStreamBuffer;
  550. size_t D.6551;
  551. <bb 2> :
  552. # DEBUG BEGIN_STMT
  553. pxStreamBuffer = xStreamBuffer;
  554. # DEBUG BEGIN_STMT
  555. xReceivedLength = 0;
  556. # DEBUG BEGIN_STMT
  557. if (pvRxData == 0B)
  558. goto <bb 3>; [INV]
  559. else
  560. goto <bb 5>; [INV]
  561. <bb 3> :
  562. # DEBUG BEGIN_STMT
  563. vPortRaiseBASEPRI ();
  564. <bb 4> :
  565. # DEBUG BEGIN_STMT
  566. # DEBUG BEGIN_STMT
  567. # DEBUG BEGIN_STMT
  568. goto <bb 4>; [INV]
  569. <bb 5> :
  570. # DEBUG BEGIN_STMT
  571. # DEBUG BEGIN_STMT
  572. if (pxStreamBuffer == 0B)
  573. goto <bb 6>; [INV]
  574. else
  575. goto <bb 8>; [INV]
  576. <bb 6> :
  577. # DEBUG BEGIN_STMT
  578. vPortRaiseBASEPRI ();
  579. <bb 7> :
  580. # DEBUG BEGIN_STMT
  581. # DEBUG BEGIN_STMT
  582. # DEBUG BEGIN_STMT
  583. goto <bb 7>; [INV]
  584. <bb 8> :
  585. # DEBUG BEGIN_STMT
  586. # DEBUG BEGIN_STMT
  587. _1 = pxStreamBuffer->ucFlags;
  588. _2 = (int) _1;
  589. _3 = _2 & 1;
  590. if (_3 != 0)
  591. goto <bb 9>; [INV]
  592. else
  593. goto <bb 10>; [INV]
  594. <bb 9> :
  595. # DEBUG BEGIN_STMT
  596. xBytesToStoreMessageLength = 4;
  597. goto <bb 11>; [INV]
  598. <bb 10> :
  599. # DEBUG BEGIN_STMT
  600. xBytesToStoreMessageLength = 0;
  601. <bb 11> :
  602. # DEBUG BEGIN_STMT
  603. xBytesAvailable = prvBytesInBuffer (pxStreamBuffer);
  604. # DEBUG BEGIN_STMT
  605. if (xBytesAvailable > xBytesToStoreMessageLength)
  606. goto <bb 12>; [INV]
  607. else
  608. goto <bb 16>; [INV]
  609. <bb 12> :
  610. # DEBUG BEGIN_STMT
  611. xReceivedLength = prvReadMessageFromBuffer (pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable);
  612. # DEBUG BEGIN_STMT
  613. if (xReceivedLength != 0)
  614. goto <bb 13>; [INV]
  615. else
  616. goto <bb 16>; [INV]
  617. <bb 13> :
  618. # DEBUG BEGIN_STMT
  619. # DEBUG BEGIN_STMT
  620. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  621. # DEBUG BEGIN_STMT
  622. _4 = pxStreamBuffer->xTaskWaitingToSend;
  623. if (_4 != 0B)
  624. goto <bb 14>; [INV]
  625. else
  626. goto <bb 15>; [INV]
  627. <bb 14> :
  628. # DEBUG BEGIN_STMT
  629. _5 = pxStreamBuffer->xTaskWaitingToSend;
  630. xTaskGenericNotifyFromISR (_5, 0, 0, 0, 0B, pxHigherPriorityTaskWoken);
  631. # DEBUG BEGIN_STMT
  632. pxStreamBuffer->xTaskWaitingToSend = 0B;
  633. <bb 15> :
  634. # DEBUG BEGIN_STMT
  635. vPortSetBASEPRI (uxSavedInterruptStatus);
  636. # DEBUG BEGIN_STMT
  637. <bb 16> :
  638. # DEBUG BEGIN_STMT
  639. # DEBUG BEGIN_STMT
  640. # DEBUG BEGIN_STMT
  641. D.6551 = xReceivedLength;
  642. return D.6551;
  643. }
  644. xStreamBufferNextMessageLengthBytes (struct StreamBufferDef_t * xStreamBuffer)
  645. {
  646. size_t xTempReturn;
  647. size_t xBytesAvailable;
  648. size_t xReturn;
  649. struct StreamBuffer_t * const pxStreamBuffer;
  650. size_t D.6533;
  651. <bb 2> :
  652. # DEBUG BEGIN_STMT
  653. pxStreamBuffer = xStreamBuffer;
  654. # DEBUG BEGIN_STMT
  655. # DEBUG BEGIN_STMT
  656. # DEBUG BEGIN_STMT
  657. if (pxStreamBuffer == 0B)
  658. goto <bb 3>; [INV]
  659. else
  660. goto <bb 5>; [INV]
  661. <bb 3> :
  662. # DEBUG BEGIN_STMT
  663. vPortRaiseBASEPRI ();
  664. <bb 4> :
  665. # DEBUG BEGIN_STMT
  666. # DEBUG BEGIN_STMT
  667. # DEBUG BEGIN_STMT
  668. goto <bb 4>; [INV]
  669. <bb 5> :
  670. # DEBUG BEGIN_STMT
  671. # DEBUG BEGIN_STMT
  672. _1 = pxStreamBuffer->ucFlags;
  673. _2 = (int) _1;
  674. _3 = _2 & 1;
  675. if (_3 != 0)
  676. goto <bb 6>; [INV]
  677. else
  678. goto <bb 12>; [INV]
  679. <bb 6> :
  680. # DEBUG BEGIN_STMT
  681. xBytesAvailable = prvBytesInBuffer (pxStreamBuffer);
  682. # DEBUG BEGIN_STMT
  683. if (xBytesAvailable > 4)
  684. goto <bb 7>; [INV]
  685. else
  686. goto <bb 8>; [INV]
  687. <bb 7> :
  688. # DEBUG BEGIN_STMT
  689. _4 = pxStreamBuffer->xTail;
  690. prvReadBytesFromBuffer (pxStreamBuffer, &xTempReturn, 4, _4);
  691. # DEBUG BEGIN_STMT
  692. xReturn = xTempReturn;
  693. goto <bb 13>; [INV]
  694. <bb 8> :
  695. # DEBUG BEGIN_STMT
  696. if (xBytesAvailable != 0)
  697. goto <bb 9>; [INV]
  698. else
  699. goto <bb 11>; [INV]
  700. <bb 9> :
  701. # DEBUG BEGIN_STMT
  702. vPortRaiseBASEPRI ();
  703. <bb 10> :
  704. # DEBUG BEGIN_STMT
  705. # DEBUG BEGIN_STMT
  706. # DEBUG BEGIN_STMT
  707. goto <bb 10>; [INV]
  708. <bb 11> :
  709. # DEBUG BEGIN_STMT
  710. # DEBUG BEGIN_STMT
  711. xReturn = 0;
  712. goto <bb 13>; [INV]
  713. <bb 12> :
  714. # DEBUG BEGIN_STMT
  715. xReturn = 0;
  716. <bb 13> :
  717. # DEBUG BEGIN_STMT
  718. D.6533 = xReturn;
  719. xTempReturn = {CLOBBER};
  720. return D.6533;
  721. }
  722. xStreamBufferReceive (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait)
  723. {
  724. size_t xBytesToStoreMessageLength;
  725. size_t xBytesAvailable;
  726. size_t xReceivedLength;
  727. struct StreamBuffer_t * const pxStreamBuffer;
  728. size_t D.6497;
  729. <bb 2> :
  730. # DEBUG BEGIN_STMT
  731. pxStreamBuffer = xStreamBuffer;
  732. # DEBUG BEGIN_STMT
  733. xReceivedLength = 0;
  734. # DEBUG BEGIN_STMT
  735. if (pvRxData == 0B)
  736. goto <bb 3>; [INV]
  737. else
  738. goto <bb 5>; [INV]
  739. <bb 3> :
  740. # DEBUG BEGIN_STMT
  741. vPortRaiseBASEPRI ();
  742. <bb 4> :
  743. # DEBUG BEGIN_STMT
  744. # DEBUG BEGIN_STMT
  745. # DEBUG BEGIN_STMT
  746. goto <bb 4>; [INV]
  747. <bb 5> :
  748. # DEBUG BEGIN_STMT
  749. # DEBUG BEGIN_STMT
  750. if (pxStreamBuffer == 0B)
  751. goto <bb 6>; [INV]
  752. else
  753. goto <bb 8>; [INV]
  754. <bb 6> :
  755. # DEBUG BEGIN_STMT
  756. vPortRaiseBASEPRI ();
  757. <bb 7> :
  758. # DEBUG BEGIN_STMT
  759. # DEBUG BEGIN_STMT
  760. # DEBUG BEGIN_STMT
  761. goto <bb 7>; [INV]
  762. <bb 8> :
  763. # DEBUG BEGIN_STMT
  764. # DEBUG BEGIN_STMT
  765. _1 = pxStreamBuffer->ucFlags;
  766. _2 = (int) _1;
  767. _3 = _2 & 1;
  768. if (_3 != 0)
  769. goto <bb 9>; [INV]
  770. else
  771. goto <bb 10>; [INV]
  772. <bb 9> :
  773. # DEBUG BEGIN_STMT
  774. xBytesToStoreMessageLength = 4;
  775. goto <bb 11>; [INV]
  776. <bb 10> :
  777. # DEBUG BEGIN_STMT
  778. xBytesToStoreMessageLength = 0;
  779. <bb 11> :
  780. # DEBUG BEGIN_STMT
  781. if (xTicksToWait != 0)
  782. goto <bb 12>; [INV]
  783. else
  784. goto <bb 19>; [INV]
  785. <bb 12> :
  786. # DEBUG BEGIN_STMT
  787. vPortEnterCritical ();
  788. # DEBUG BEGIN_STMT
  789. xBytesAvailable = prvBytesInBuffer (pxStreamBuffer);
  790. # DEBUG BEGIN_STMT
  791. if (xBytesAvailable <= xBytesToStoreMessageLength)
  792. goto <bb 13>; [INV]
  793. else
  794. goto <bb 17>; [INV]
  795. <bb 13> :
  796. # DEBUG BEGIN_STMT
  797. xTaskGenericNotifyStateClear (0B, 0);
  798. # DEBUG BEGIN_STMT
  799. _4 = pxStreamBuffer->xTaskWaitingToReceive;
  800. if (_4 != 0B)
  801. goto <bb 14>; [INV]
  802. else
  803. goto <bb 16>; [INV]
  804. <bb 14> :
  805. # DEBUG BEGIN_STMT
  806. vPortRaiseBASEPRI ();
  807. <bb 15> :
  808. # DEBUG BEGIN_STMT
  809. # DEBUG BEGIN_STMT
  810. # DEBUG BEGIN_STMT
  811. goto <bb 15>; [INV]
  812. <bb 16> :
  813. # DEBUG BEGIN_STMT
  814. # DEBUG BEGIN_STMT
  815. _5 = xTaskGetCurrentTaskHandle ();
  816. pxStreamBuffer->xTaskWaitingToReceive = _5;
  817. <bb 17> :
  818. # DEBUG BEGIN_STMT
  819. # DEBUG BEGIN_STMT
  820. vPortExitCritical ();
  821. # DEBUG BEGIN_STMT
  822. if (xBytesAvailable <= xBytesToStoreMessageLength)
  823. goto <bb 18>; [INV]
  824. else
  825. goto <bb 20>; [INV]
  826. <bb 18> :
  827. # DEBUG BEGIN_STMT
  828. # DEBUG BEGIN_STMT
  829. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait);
  830. # DEBUG BEGIN_STMT
  831. pxStreamBuffer->xTaskWaitingToReceive = 0B;
  832. # DEBUG BEGIN_STMT
  833. xBytesAvailable = prvBytesInBuffer (pxStreamBuffer);
  834. goto <bb 20>; [INV]
  835. <bb 19> :
  836. # DEBUG BEGIN_STMT
  837. xBytesAvailable = prvBytesInBuffer (pxStreamBuffer);
  838. <bb 20> :
  839. # DEBUG BEGIN_STMT
  840. if (xBytesAvailable > xBytesToStoreMessageLength)
  841. goto <bb 21>; [INV]
  842. else
  843. goto <bb 25>; [INV]
  844. <bb 21> :
  845. # DEBUG BEGIN_STMT
  846. xReceivedLength = prvReadMessageFromBuffer (pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable);
  847. # DEBUG BEGIN_STMT
  848. if (xReceivedLength != 0)
  849. goto <bb 22>; [INV]
  850. else
  851. goto <bb 25>; [INV]
  852. <bb 22> :
  853. # DEBUG BEGIN_STMT
  854. # DEBUG BEGIN_STMT
  855. vTaskSuspendAll ();
  856. # DEBUG BEGIN_STMT
  857. _6 = pxStreamBuffer->xTaskWaitingToSend;
  858. if (_6 != 0B)
  859. goto <bb 23>; [INV]
  860. else
  861. goto <bb 24>; [INV]
  862. <bb 23> :
  863. # DEBUG BEGIN_STMT
  864. _7 = pxStreamBuffer->xTaskWaitingToSend;
  865. xTaskGenericNotify (_7, 0, 0, 0, 0B);
  866. # DEBUG BEGIN_STMT
  867. pxStreamBuffer->xTaskWaitingToSend = 0B;
  868. <bb 24> :
  869. # DEBUG BEGIN_STMT
  870. xTaskResumeAll ();
  871. # DEBUG BEGIN_STMT
  872. <bb 25> :
  873. # DEBUG BEGIN_STMT
  874. # DEBUG BEGIN_STMT
  875. # DEBUG BEGIN_STMT
  876. D.6497 = xReceivedLength;
  877. return D.6497;
  878. }
  879. prvWriteMessageToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace)
  880. {
  881. size_t xNextHead;
  882. size_t D.6436;
  883. <bb 2> :
  884. # DEBUG BEGIN_STMT
  885. xNextHead = pxStreamBuffer->xHead;
  886. # DEBUG BEGIN_STMT
  887. _1 = pxStreamBuffer->ucFlags;
  888. _2 = (int) _1;
  889. _3 = _2 & 1;
  890. if (_3 != 0)
  891. goto <bb 3>; [INV]
  892. else
  893. goto <bb 6>; [INV]
  894. <bb 3> :
  895. # DEBUG BEGIN_STMT
  896. if (xSpace >= xRequiredSpace)
  897. goto <bb 4>; [INV]
  898. else
  899. goto <bb 5>; [INV]
  900. <bb 4> :
  901. # DEBUG BEGIN_STMT
  902. xNextHead = prvWriteBytesToBuffer (pxStreamBuffer, &xDataLengthBytes, 4, xNextHead);
  903. goto <bb 7>; [INV]
  904. <bb 5> :
  905. # DEBUG BEGIN_STMT
  906. xDataLengthBytes = 0;
  907. goto <bb 7>; [INV]
  908. <bb 6> :
  909. # DEBUG BEGIN_STMT
  910. xDataLengthBytes.2_4 = xDataLengthBytes;
  911. _5 = MIN_EXPR <xSpace, xDataLengthBytes.2_4>;
  912. xDataLengthBytes = _5;
  913. <bb 7> :
  914. # DEBUG BEGIN_STMT
  915. xDataLengthBytes.3_6 = xDataLengthBytes;
  916. if (xDataLengthBytes.3_6 != 0)
  917. goto <bb 8>; [INV]
  918. else
  919. goto <bb 9>; [INV]
  920. <bb 8> :
  921. # DEBUG BEGIN_STMT
  922. xDataLengthBytes.4_7 = xDataLengthBytes;
  923. _8 = prvWriteBytesToBuffer (pxStreamBuffer, pvTxData, xDataLengthBytes.4_7, xNextHead);
  924. pxStreamBuffer->xHead = _8;
  925. <bb 9> :
  926. # DEBUG BEGIN_STMT
  927. D.6436 = xDataLengthBytes;
  928. return D.6436;
  929. }
  930. xStreamBufferSendFromISR (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  931. {
  932. UBaseType_t uxSavedInterruptStatus;
  933. size_t xRequiredSpace;
  934. size_t xSpace;
  935. size_t xReturn;
  936. struct StreamBuffer_t * const pxStreamBuffer;
  937. size_t D.6467;
  938. <bb 2> :
  939. # DEBUG BEGIN_STMT
  940. pxStreamBuffer = xStreamBuffer;
  941. # DEBUG BEGIN_STMT
  942. # DEBUG BEGIN_STMT
  943. xRequiredSpace = xDataLengthBytes;
  944. # DEBUG BEGIN_STMT
  945. if (pvTxData == 0B)
  946. goto <bb 3>; [INV]
  947. else
  948. goto <bb 5>; [INV]
  949. <bb 3> :
  950. # DEBUG BEGIN_STMT
  951. vPortRaiseBASEPRI ();
  952. <bb 4> :
  953. # DEBUG BEGIN_STMT
  954. # DEBUG BEGIN_STMT
  955. # DEBUG BEGIN_STMT
  956. goto <bb 4>; [INV]
  957. <bb 5> :
  958. # DEBUG BEGIN_STMT
  959. # DEBUG BEGIN_STMT
  960. if (pxStreamBuffer == 0B)
  961. goto <bb 6>; [INV]
  962. else
  963. goto <bb 8>; [INV]
  964. <bb 6> :
  965. # DEBUG BEGIN_STMT
  966. vPortRaiseBASEPRI ();
  967. <bb 7> :
  968. # DEBUG BEGIN_STMT
  969. # DEBUG BEGIN_STMT
  970. # DEBUG BEGIN_STMT
  971. goto <bb 7>; [INV]
  972. <bb 8> :
  973. # DEBUG BEGIN_STMT
  974. # DEBUG BEGIN_STMT
  975. _1 = pxStreamBuffer->ucFlags;
  976. _2 = (int) _1;
  977. _3 = _2 & 1;
  978. if (_3 != 0)
  979. goto <bb 9>; [INV]
  980. else
  981. goto <bb 10>; [INV]
  982. <bb 9> :
  983. # DEBUG BEGIN_STMT
  984. xRequiredSpace = xRequiredSpace + 4;
  985. <bb 10> :
  986. # DEBUG BEGIN_STMT
  987. # DEBUG BEGIN_STMT
  988. xSpace = xStreamBufferSpacesAvailable (pxStreamBuffer);
  989. # DEBUG BEGIN_STMT
  990. xReturn = prvWriteMessageToBuffer (pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace);
  991. # DEBUG BEGIN_STMT
  992. if (xReturn != 0)
  993. goto <bb 11>; [INV]
  994. else
  995. goto <bb 15>; [INV]
  996. <bb 11> :
  997. # DEBUG BEGIN_STMT
  998. _4 = prvBytesInBuffer (pxStreamBuffer);
  999. _5 = pxStreamBuffer->xTriggerLevelBytes;
  1000. if (_4 >= _5)
  1001. goto <bb 12>; [INV]
  1002. else
  1003. goto <bb 15>; [INV]
  1004. <bb 12> :
  1005. # DEBUG BEGIN_STMT
  1006. # DEBUG BEGIN_STMT
  1007. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  1008. # DEBUG BEGIN_STMT
  1009. _6 = pxStreamBuffer->xTaskWaitingToReceive;
  1010. if (_6 != 0B)
  1011. goto <bb 13>; [INV]
  1012. else
  1013. goto <bb 14>; [INV]
  1014. <bb 13> :
  1015. # DEBUG BEGIN_STMT
  1016. _7 = pxStreamBuffer->xTaskWaitingToReceive;
  1017. xTaskGenericNotifyFromISR (_7, 0, 0, 0, 0B, pxHigherPriorityTaskWoken);
  1018. # DEBUG BEGIN_STMT
  1019. pxStreamBuffer->xTaskWaitingToReceive = 0B;
  1020. <bb 14> :
  1021. # DEBUG BEGIN_STMT
  1022. vPortSetBASEPRI (uxSavedInterruptStatus);
  1023. # DEBUG BEGIN_STMT
  1024. <bb 15> :
  1025. # DEBUG BEGIN_STMT
  1026. # DEBUG BEGIN_STMT
  1027. # DEBUG BEGIN_STMT
  1028. D.6467 = xReturn;
  1029. return D.6467;
  1030. }
  1031. xStreamBufferSend (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait)
  1032. {
  1033. size_t xMaxReportedSpace;
  1034. struct TimeOut_t xTimeOut;
  1035. size_t xRequiredSpace;
  1036. size_t xSpace;
  1037. size_t xReturn;
  1038. struct StreamBuffer_t * const pxStreamBuffer;
  1039. size_t D.6425;
  1040. <bb 2> :
  1041. # DEBUG BEGIN_STMT
  1042. pxStreamBuffer = xStreamBuffer;
  1043. # DEBUG BEGIN_STMT
  1044. xSpace = 0;
  1045. # DEBUG BEGIN_STMT
  1046. xRequiredSpace = xDataLengthBytes;
  1047. # DEBUG BEGIN_STMT
  1048. # DEBUG BEGIN_STMT
  1049. xMaxReportedSpace = 0;
  1050. # DEBUG BEGIN_STMT
  1051. if (pvTxData == 0B)
  1052. goto <bb 3>; [INV]
  1053. else
  1054. goto <bb 5>; [INV]
  1055. <bb 3> :
  1056. # DEBUG BEGIN_STMT
  1057. vPortRaiseBASEPRI ();
  1058. <bb 4> :
  1059. # DEBUG BEGIN_STMT
  1060. # DEBUG BEGIN_STMT
  1061. # DEBUG BEGIN_STMT
  1062. goto <bb 4>; [INV]
  1063. <bb 5> :
  1064. # DEBUG BEGIN_STMT
  1065. # DEBUG BEGIN_STMT
  1066. if (pxStreamBuffer == 0B)
  1067. goto <bb 6>; [INV]
  1068. else
  1069. goto <bb 8>; [INV]
  1070. <bb 6> :
  1071. # DEBUG BEGIN_STMT
  1072. vPortRaiseBASEPRI ();
  1073. <bb 7> :
  1074. # DEBUG BEGIN_STMT
  1075. # DEBUG BEGIN_STMT
  1076. # DEBUG BEGIN_STMT
  1077. goto <bb 7>; [INV]
  1078. <bb 8> :
  1079. # DEBUG BEGIN_STMT
  1080. # DEBUG BEGIN_STMT
  1081. _1 = pxStreamBuffer->xLength;
  1082. xMaxReportedSpace = _1 + 4294967295;
  1083. # DEBUG BEGIN_STMT
  1084. _2 = pxStreamBuffer->ucFlags;
  1085. _3 = (int) _2;
  1086. _4 = _3 & 1;
  1087. if (_4 != 0)
  1088. goto <bb 9>; [INV]
  1089. else
  1090. goto <bb 14>; [INV]
  1091. <bb 9> :
  1092. # DEBUG BEGIN_STMT
  1093. xRequiredSpace = xRequiredSpace + 4;
  1094. # DEBUG BEGIN_STMT
  1095. if (xRequiredSpace <= xDataLengthBytes)
  1096. goto <bb 10>; [INV]
  1097. else
  1098. goto <bb 12>; [INV]
  1099. <bb 10> :
  1100. # DEBUG BEGIN_STMT
  1101. vPortRaiseBASEPRI ();
  1102. <bb 11> :
  1103. # DEBUG BEGIN_STMT
  1104. # DEBUG BEGIN_STMT
  1105. # DEBUG BEGIN_STMT
  1106. goto <bb 11>; [INV]
  1107. <bb 12> :
  1108. # DEBUG BEGIN_STMT
  1109. # DEBUG BEGIN_STMT
  1110. if (xRequiredSpace > xMaxReportedSpace)
  1111. goto <bb 13>; [INV]
  1112. else
  1113. goto <bb 16>; [INV]
  1114. <bb 13> :
  1115. # DEBUG BEGIN_STMT
  1116. xTicksToWait = 0;
  1117. goto <bb 16>; [INV]
  1118. <bb 14> :
  1119. # DEBUG BEGIN_STMT
  1120. if (xRequiredSpace > xMaxReportedSpace)
  1121. goto <bb 15>; [INV]
  1122. else
  1123. goto <bb 16>; [INV]
  1124. <bb 15> :
  1125. # DEBUG BEGIN_STMT
  1126. xRequiredSpace = xMaxReportedSpace;
  1127. <bb 16> :
  1128. # DEBUG BEGIN_STMT
  1129. # DEBUG BEGIN_STMT
  1130. xTicksToWait.0_5 = xTicksToWait;
  1131. if (xTicksToWait.0_5 != 0)
  1132. goto <bb 17>; [INV]
  1133. else
  1134. goto <bb 24>; [INV]
  1135. <bb 17> :
  1136. # DEBUG BEGIN_STMT
  1137. vTaskSetTimeOutState (&xTimeOut);
  1138. <bb 18> :
  1139. # DEBUG BEGIN_STMT
  1140. # DEBUG BEGIN_STMT
  1141. vPortEnterCritical ();
  1142. # DEBUG BEGIN_STMT
  1143. xSpace = xStreamBufferSpacesAvailable (pxStreamBuffer);
  1144. # DEBUG BEGIN_STMT
  1145. if (xSpace < xRequiredSpace)
  1146. goto <bb 19>; [INV]
  1147. else
  1148. goto <bb 23>; [INV]
  1149. <bb 19> :
  1150. # DEBUG BEGIN_STMT
  1151. xTaskGenericNotifyStateClear (0B, 0);
  1152. # DEBUG BEGIN_STMT
  1153. _6 = pxStreamBuffer->xTaskWaitingToSend;
  1154. if (_6 != 0B)
  1155. goto <bb 20>; [INV]
  1156. else
  1157. goto <bb 22>; [INV]
  1158. <bb 20> :
  1159. # DEBUG BEGIN_STMT
  1160. vPortRaiseBASEPRI ();
  1161. <bb 21> :
  1162. # DEBUG BEGIN_STMT
  1163. # DEBUG BEGIN_STMT
  1164. # DEBUG BEGIN_STMT
  1165. goto <bb 21>; [INV]
  1166. <bb 22> :
  1167. # DEBUG BEGIN_STMT
  1168. # DEBUG BEGIN_STMT
  1169. _7 = xTaskGetCurrentTaskHandle ();
  1170. pxStreamBuffer->xTaskWaitingToSend = _7;
  1171. # DEBUG BEGIN_STMT
  1172. vPortExitCritical ();
  1173. # DEBUG BEGIN_STMT
  1174. # DEBUG BEGIN_STMT
  1175. xTicksToWait.1_8 = xTicksToWait;
  1176. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait.1_8);
  1177. # DEBUG BEGIN_STMT
  1178. pxStreamBuffer->xTaskWaitingToSend = 0B;
  1179. # DEBUG BEGIN_STMT
  1180. _9 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1181. if (_9 == 0)
  1182. goto <bb 18>; [INV]
  1183. else
  1184. goto <bb 24>; [INV]
  1185. <bb 23> :
  1186. # DEBUG BEGIN_STMT
  1187. vPortExitCritical ();
  1188. # DEBUG BEGIN_STMT
  1189. <bb 24> :
  1190. # DEBUG BEGIN_STMT
  1191. # DEBUG BEGIN_STMT
  1192. if (xSpace == 0)
  1193. goto <bb 25>; [INV]
  1194. else
  1195. goto <bb 26>; [INV]
  1196. <bb 25> :
  1197. # DEBUG BEGIN_STMT
  1198. xSpace = xStreamBufferSpacesAvailable (pxStreamBuffer);
  1199. <bb 26> :
  1200. # DEBUG BEGIN_STMT
  1201. # DEBUG BEGIN_STMT
  1202. xReturn = prvWriteMessageToBuffer (pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace);
  1203. # DEBUG BEGIN_STMT
  1204. if (xReturn != 0)
  1205. goto <bb 27>; [INV]
  1206. else
  1207. goto <bb 31>; [INV]
  1208. <bb 27> :
  1209. # DEBUG BEGIN_STMT
  1210. # DEBUG BEGIN_STMT
  1211. _10 = prvBytesInBuffer (pxStreamBuffer);
  1212. _11 = pxStreamBuffer->xTriggerLevelBytes;
  1213. if (_10 >= _11)
  1214. goto <bb 28>; [INV]
  1215. else
  1216. goto <bb 31>; [INV]
  1217. <bb 28> :
  1218. # DEBUG BEGIN_STMT
  1219. vTaskSuspendAll ();
  1220. # DEBUG BEGIN_STMT
  1221. _12 = pxStreamBuffer->xTaskWaitingToReceive;
  1222. if (_12 != 0B)
  1223. goto <bb 29>; [INV]
  1224. else
  1225. goto <bb 30>; [INV]
  1226. <bb 29> :
  1227. # DEBUG BEGIN_STMT
  1228. _13 = pxStreamBuffer->xTaskWaitingToReceive;
  1229. xTaskGenericNotify (_13, 0, 0, 0, 0B);
  1230. # DEBUG BEGIN_STMT
  1231. pxStreamBuffer->xTaskWaitingToReceive = 0B;
  1232. <bb 30> :
  1233. # DEBUG BEGIN_STMT
  1234. xTaskResumeAll ();
  1235. # DEBUG BEGIN_STMT
  1236. <bb 31> :
  1237. # DEBUG BEGIN_STMT
  1238. # DEBUG BEGIN_STMT
  1239. # DEBUG BEGIN_STMT
  1240. D.6425 = xReturn;
  1241. xTimeOut = {CLOBBER};
  1242. return D.6425;
  1243. }
  1244. xStreamBufferBytesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1245. {
  1246. size_t xReturn;
  1247. const struct StreamBuffer_t * const pxStreamBuffer;
  1248. size_t D.6383;
  1249. <bb 2> :
  1250. # DEBUG BEGIN_STMT
  1251. pxStreamBuffer = xStreamBuffer;
  1252. # DEBUG BEGIN_STMT
  1253. # DEBUG BEGIN_STMT
  1254. if (pxStreamBuffer == 0B)
  1255. goto <bb 3>; [INV]
  1256. else
  1257. goto <bb 5>; [INV]
  1258. <bb 3> :
  1259. # DEBUG BEGIN_STMT
  1260. vPortRaiseBASEPRI ();
  1261. <bb 4> :
  1262. # DEBUG BEGIN_STMT
  1263. # DEBUG BEGIN_STMT
  1264. # DEBUG BEGIN_STMT
  1265. goto <bb 4>; [INV]
  1266. <bb 5> :
  1267. # DEBUG BEGIN_STMT
  1268. # DEBUG BEGIN_STMT
  1269. xReturn = prvBytesInBuffer (pxStreamBuffer);
  1270. # DEBUG BEGIN_STMT
  1271. D.6383 = xReturn;
  1272. return D.6383;
  1273. }
  1274. xStreamBufferSpacesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1275. {
  1276. size_t xOriginalTail;
  1277. size_t xSpace;
  1278. const struct StreamBuffer_t * const pxStreamBuffer;
  1279. size_t D.6379;
  1280. unsigned int D.6375;
  1281. <bb 2> :
  1282. # DEBUG BEGIN_STMT
  1283. pxStreamBuffer = xStreamBuffer;
  1284. # DEBUG BEGIN_STMT
  1285. # DEBUG BEGIN_STMT
  1286. # DEBUG BEGIN_STMT
  1287. if (pxStreamBuffer == 0B)
  1288. goto <bb 3>; [INV]
  1289. else
  1290. goto <bb 5>; [INV]
  1291. <bb 3> :
  1292. # DEBUG BEGIN_STMT
  1293. vPortRaiseBASEPRI ();
  1294. <bb 4> :
  1295. # DEBUG BEGIN_STMT
  1296. # DEBUG BEGIN_STMT
  1297. # DEBUG BEGIN_STMT
  1298. goto <bb 4>; [INV]
  1299. <bb 5> :
  1300. # DEBUG BEGIN_STMT
  1301. # DEBUG BEGIN_STMT
  1302. # DEBUG BEGIN_STMT
  1303. xOriginalTail = pxStreamBuffer->xTail;
  1304. # DEBUG BEGIN_STMT
  1305. _1 = pxStreamBuffer->xLength;
  1306. _2 = pxStreamBuffer->xTail;
  1307. xSpace = _1 + _2;
  1308. # DEBUG BEGIN_STMT
  1309. D.6375 = pxStreamBuffer->xHead;
  1310. xSpace = xSpace - D.6375;
  1311. # DEBUG BEGIN_STMT
  1312. _3 = pxStreamBuffer->xTail;
  1313. if (xOriginalTail != _3)
  1314. goto <bb 5>; [INV]
  1315. else
  1316. goto <bb 6>; [INV]
  1317. <bb 6> :
  1318. # DEBUG BEGIN_STMT
  1319. xSpace = xSpace + 4294967295;
  1320. # DEBUG BEGIN_STMT
  1321. _4 = pxStreamBuffer->xLength;
  1322. if (xSpace >= _4)
  1323. goto <bb 7>; [INV]
  1324. else
  1325. goto <bb 8>; [INV]
  1326. <bb 7> :
  1327. # DEBUG BEGIN_STMT
  1328. _5 = pxStreamBuffer->xLength;
  1329. xSpace = xSpace - _5;
  1330. <bb 8> :
  1331. # DEBUG BEGIN_STMT
  1332. # DEBUG BEGIN_STMT
  1333. D.6379 = xSpace;
  1334. return D.6379;
  1335. }
  1336. xStreamBufferSetTriggerLevel (struct StreamBufferDef_t * xStreamBuffer, size_t xTriggerLevel)
  1337. {
  1338. BaseType_t xReturn;
  1339. struct StreamBuffer_t * const pxStreamBuffer;
  1340. BaseType_t D.6371;
  1341. <bb 2> :
  1342. # DEBUG BEGIN_STMT
  1343. pxStreamBuffer = xStreamBuffer;
  1344. # DEBUG BEGIN_STMT
  1345. # DEBUG BEGIN_STMT
  1346. if (pxStreamBuffer == 0B)
  1347. goto <bb 3>; [INV]
  1348. else
  1349. goto <bb 5>; [INV]
  1350. <bb 3> :
  1351. # DEBUG BEGIN_STMT
  1352. vPortRaiseBASEPRI ();
  1353. <bb 4> :
  1354. # DEBUG BEGIN_STMT
  1355. # DEBUG BEGIN_STMT
  1356. # DEBUG BEGIN_STMT
  1357. goto <bb 4>; [INV]
  1358. <bb 5> :
  1359. # DEBUG BEGIN_STMT
  1360. # DEBUG BEGIN_STMT
  1361. if (xTriggerLevel == 0)
  1362. goto <bb 6>; [INV]
  1363. else
  1364. goto <bb 7>; [INV]
  1365. <bb 6> :
  1366. # DEBUG BEGIN_STMT
  1367. xTriggerLevel = 1;
  1368. <bb 7> :
  1369. # DEBUG BEGIN_STMT
  1370. _1 = pxStreamBuffer->xLength;
  1371. if (xTriggerLevel < _1)
  1372. goto <bb 8>; [INV]
  1373. else
  1374. goto <bb 9>; [INV]
  1375. <bb 8> :
  1376. # DEBUG BEGIN_STMT
  1377. pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel;
  1378. # DEBUG BEGIN_STMT
  1379. xReturn = 1;
  1380. goto <bb 10>; [INV]
  1381. <bb 9> :
  1382. # DEBUG BEGIN_STMT
  1383. xReturn = 0;
  1384. <bb 10> :
  1385. # DEBUG BEGIN_STMT
  1386. D.6371 = xReturn;
  1387. return D.6371;
  1388. }
  1389. xStreamBufferReset (struct StreamBufferDef_t * xStreamBuffer)
  1390. {
  1391. UBaseType_t uxStreamBufferNumber;
  1392. BaseType_t xReturn;
  1393. struct StreamBuffer_t * const pxStreamBuffer;
  1394. BaseType_t D.6362;
  1395. <bb 2> :
  1396. # DEBUG BEGIN_STMT
  1397. pxStreamBuffer = xStreamBuffer;
  1398. # DEBUG BEGIN_STMT
  1399. xReturn = 0;
  1400. # DEBUG BEGIN_STMT
  1401. # DEBUG BEGIN_STMT
  1402. if (pxStreamBuffer == 0B)
  1403. goto <bb 3>; [INV]
  1404. else
  1405. goto <bb 5>; [INV]
  1406. <bb 3> :
  1407. # DEBUG BEGIN_STMT
  1408. vPortRaiseBASEPRI ();
  1409. <bb 4> :
  1410. # DEBUG BEGIN_STMT
  1411. # DEBUG BEGIN_STMT
  1412. # DEBUG BEGIN_STMT
  1413. goto <bb 4>; [INV]
  1414. <bb 5> :
  1415. # DEBUG BEGIN_STMT
  1416. # DEBUG BEGIN_STMT
  1417. uxStreamBufferNumber = pxStreamBuffer->uxStreamBufferNumber;
  1418. # DEBUG BEGIN_STMT
  1419. vPortEnterCritical ();
  1420. # DEBUG BEGIN_STMT
  1421. _1 = pxStreamBuffer->xTaskWaitingToReceive;
  1422. if (_1 == 0B)
  1423. goto <bb 6>; [INV]
  1424. else
  1425. goto <bb 8>; [INV]
  1426. <bb 6> :
  1427. # DEBUG BEGIN_STMT
  1428. _2 = pxStreamBuffer->xTaskWaitingToSend;
  1429. if (_2 == 0B)
  1430. goto <bb 7>; [INV]
  1431. else
  1432. goto <bb 8>; [INV]
  1433. <bb 7> :
  1434. # DEBUG BEGIN_STMT
  1435. _3 = pxStreamBuffer->pucBuffer;
  1436. _4 = pxStreamBuffer->xLength;
  1437. _5 = pxStreamBuffer->xTriggerLevelBytes;
  1438. _6 = pxStreamBuffer->ucFlags;
  1439. prvInitialiseNewStreamBuffer (pxStreamBuffer, _3, _4, _5, _6);
  1440. # DEBUG BEGIN_STMT
  1441. xReturn = 1;
  1442. # DEBUG BEGIN_STMT
  1443. pxStreamBuffer->uxStreamBufferNumber = uxStreamBufferNumber;
  1444. <bb 8> :
  1445. # DEBUG BEGIN_STMT
  1446. # DEBUG BEGIN_STMT
  1447. vPortExitCritical ();
  1448. # DEBUG BEGIN_STMT
  1449. D.6362 = xReturn;
  1450. return D.6362;
  1451. }
  1452. vStreamBufferDelete (struct StreamBufferDef_t * xStreamBuffer)
  1453. {
  1454. struct StreamBuffer_t * pxStreamBuffer;
  1455. <bb 2> :
  1456. # DEBUG BEGIN_STMT
  1457. pxStreamBuffer = xStreamBuffer;
  1458. # DEBUG BEGIN_STMT
  1459. if (pxStreamBuffer == 0B)
  1460. goto <bb 3>; [INV]
  1461. else
  1462. goto <bb 5>; [INV]
  1463. <bb 3> :
  1464. # DEBUG BEGIN_STMT
  1465. vPortRaiseBASEPRI ();
  1466. <bb 4> :
  1467. # DEBUG BEGIN_STMT
  1468. # DEBUG BEGIN_STMT
  1469. # DEBUG BEGIN_STMT
  1470. goto <bb 4>; [INV]
  1471. <bb 5> :
  1472. # DEBUG BEGIN_STMT
  1473. # DEBUG BEGIN_STMT
  1474. # DEBUG BEGIN_STMT
  1475. _1 = pxStreamBuffer->ucFlags;
  1476. _2 = (int) _1;
  1477. _3 = _2 & 2;
  1478. if (_3 == 0)
  1479. goto <bb 6>; [INV]
  1480. else
  1481. goto <bb 7>; [INV]
  1482. <bb 6> :
  1483. # DEBUG BEGIN_STMT
  1484. vPortFree (pxStreamBuffer);
  1485. goto <bb 8>; [INV]
  1486. <bb 7> :
  1487. # DEBUG BEGIN_STMT
  1488. memset (pxStreamBuffer, 0, 36);
  1489. <bb 8> :
  1490. return;
  1491. }
  1492. xStreamBufferGenericCreate (size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer)
  1493. {
  1494. uint8_t ucFlags;
  1495. uint8_t * pucAllocatedMemory;
  1496. struct StreamBufferDef_t * D.6347;
  1497. <bb 2> :
  1498. # DEBUG BEGIN_STMT
  1499. # DEBUG BEGIN_STMT
  1500. # DEBUG BEGIN_STMT
  1501. if (xIsMessageBuffer == 1)
  1502. goto <bb 3>; [INV]
  1503. else
  1504. goto <bb 6>; [INV]
  1505. <bb 3> :
  1506. # DEBUG BEGIN_STMT
  1507. ucFlags = 1;
  1508. # DEBUG BEGIN_STMT
  1509. if (xBufferSizeBytes <= 4)
  1510. goto <bb 4>; [INV]
  1511. else
  1512. goto <bb 9>; [INV]
  1513. <bb 4> :
  1514. # DEBUG BEGIN_STMT
  1515. vPortRaiseBASEPRI ();
  1516. <bb 5> :
  1517. # DEBUG BEGIN_STMT
  1518. # DEBUG BEGIN_STMT
  1519. # DEBUG BEGIN_STMT
  1520. goto <bb 5>; [INV]
  1521. <bb 6> :
  1522. # DEBUG BEGIN_STMT
  1523. ucFlags = 0;
  1524. # DEBUG BEGIN_STMT
  1525. if (xBufferSizeBytes == 0)
  1526. goto <bb 7>; [INV]
  1527. else
  1528. goto <bb 9>; [INV]
  1529. <bb 7> :
  1530. # DEBUG BEGIN_STMT
  1531. vPortRaiseBASEPRI ();
  1532. <bb 8> :
  1533. # DEBUG BEGIN_STMT
  1534. # DEBUG BEGIN_STMT
  1535. # DEBUG BEGIN_STMT
  1536. goto <bb 8>; [INV]
  1537. <bb 9> :
  1538. # DEBUG BEGIN_STMT
  1539. # DEBUG BEGIN_STMT
  1540. if (xTriggerLevelBytes > xBufferSizeBytes)
  1541. goto <bb 10>; [INV]
  1542. else
  1543. goto <bb 12>; [INV]
  1544. <bb 10> :
  1545. # DEBUG BEGIN_STMT
  1546. vPortRaiseBASEPRI ();
  1547. <bb 11> :
  1548. # DEBUG BEGIN_STMT
  1549. # DEBUG BEGIN_STMT
  1550. # DEBUG BEGIN_STMT
  1551. goto <bb 11>; [INV]
  1552. <bb 12> :
  1553. # DEBUG BEGIN_STMT
  1554. # DEBUG BEGIN_STMT
  1555. if (xTriggerLevelBytes == 0)
  1556. goto <bb 13>; [INV]
  1557. else
  1558. goto <bb 14>; [INV]
  1559. <bb 13> :
  1560. # DEBUG BEGIN_STMT
  1561. xTriggerLevelBytes = 1;
  1562. <bb 14> :
  1563. # DEBUG BEGIN_STMT
  1564. if (xBufferSizeBytes <= 4294967258)
  1565. goto <bb 15>; [INV]
  1566. else
  1567. goto <bb 16>; [INV]
  1568. <bb 15> :
  1569. # DEBUG BEGIN_STMT
  1570. xBufferSizeBytes = xBufferSizeBytes + 1;
  1571. # DEBUG BEGIN_STMT
  1572. _1 = xBufferSizeBytes + 36;
  1573. pucAllocatedMemory = pvPortMalloc (_1);
  1574. goto <bb 17>; [INV]
  1575. <bb 16> :
  1576. # DEBUG BEGIN_STMT
  1577. pucAllocatedMemory = 0B;
  1578. <bb 17> :
  1579. # DEBUG BEGIN_STMT
  1580. if (pucAllocatedMemory != 0B)
  1581. goto <bb 18>; [INV]
  1582. else
  1583. goto <bb 19>; [INV]
  1584. <bb 18> :
  1585. # DEBUG BEGIN_STMT
  1586. _2 = pucAllocatedMemory + 36;
  1587. prvInitialiseNewStreamBuffer (pucAllocatedMemory, _2, xBufferSizeBytes, xTriggerLevelBytes, ucFlags);
  1588. # DEBUG BEGIN_STMT
  1589. <bb 19> :
  1590. # DEBUG BEGIN_STMT
  1591. # DEBUG BEGIN_STMT
  1592. D.6347 = pucAllocatedMemory;
  1593. return D.6347;
  1594. }
  1595. __attribute__((always_inline))
  1596. vPortSetBASEPRI (uint32_t ulNewMaskValue)
  1597. {
  1598. <bb 2> :
  1599. # DEBUG BEGIN_STMT
  1600. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue : "memory");
  1601. return;
  1602. }
  1603. __attribute__((always_inline))
  1604. ulPortRaiseBASEPRI ()
  1605. {
  1606. uint32_t ulNewBASEPRI;
  1607. uint32_t ulOriginalBASEPRI;
  1608. uint32_t D.6469;
  1609. <bb 2> :
  1610. # DEBUG BEGIN_STMT
  1611. # DEBUG BEGIN_STMT
  1612. __asm__ __volatile__(" mrs %0, basepri
  1613. mov %1, %2
  1614. msr basepri, %1
  1615. isb
  1616. dsb
  1617. " : "=r" ulOriginalBASEPRI, "=r" ulNewBASEPRI : "i" 16 : "memory");
  1618. # DEBUG BEGIN_STMT
  1619. D.6469 = ulOriginalBASEPRI;
  1620. return D.6469;
  1621. }
  1622. __attribute__((always_inline))
  1623. vPortRaiseBASEPRI ()
  1624. {
  1625. uint32_t ulNewBASEPRI;
  1626. <bb 2> :
  1627. # DEBUG BEGIN_STMT
  1628. # DEBUG BEGIN_STMT
  1629. __asm__ __volatile__(" mov %0, %1
  1630. msr basepri, %0
  1631. isb
  1632. dsb
  1633. " : "=r" ulNewBASEPRI : "i" 16 : "memory");
  1634. return;
  1635. }