stream_buffer.c.048i.remove_symbols 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313
  1. Reclaiming functions:
  2. Reclaiming variables:
  3. Clearing address taken flags:
  4. Symbol table:
  5. memcpy/42 (memcpy) @06b9e9a0
  6. Type: function
  7. Visibility: external public
  8. References:
  9. Referring:
  10. Availability: not_available
  11. Function flags:
  12. Called by: prvReadBytesFromBuffer/22 prvReadBytesFromBuffer/22 prvWriteBytesToBuffer/21 prvWriteBytesToBuffer/21
  13. Calls:
  14. xTaskGenericNotifyFromISR/41 (xTaskGenericNotifyFromISR) @06b6dc40
  15. Type: function
  16. Visibility: external public
  17. References:
  18. Referring:
  19. Availability: not_available
  20. Function flags:
  21. Called by: xStreamBufferReceiveFromISR/15 xStreamBufferSendFromISR/11 xStreamBufferReceiveCompletedFromISR/20 xStreamBufferSendCompletedFromISR/19
  22. Calls:
  23. xTaskResumeAll/40 (xTaskResumeAll) @06b6da80
  24. Type: function
  25. Visibility: external public
  26. References:
  27. Referring:
  28. Availability: not_available
  29. Function flags:
  30. Called by: xStreamBufferReceive/13 xStreamBufferSend/10
  31. Calls:
  32. xTaskGenericNotify/39 (xTaskGenericNotify) @06b6d9a0
  33. Type: function
  34. Visibility: external public
  35. References:
  36. Referring:
  37. Availability: not_available
  38. Function flags:
  39. Called by: xStreamBufferReceive/13 xStreamBufferSend/10
  40. Calls:
  41. vTaskSuspendAll/38 (vTaskSuspendAll) @06b6d8c0
  42. Type: function
  43. Visibility: external public
  44. References:
  45. Referring:
  46. Availability: not_available
  47. Function flags:
  48. Called by: xStreamBufferReceive/13 xStreamBufferSend/10
  49. Calls:
  50. xTaskCheckForTimeOut/37 (xTaskCheckForTimeOut) @06b6d7e0
  51. Type: function
  52. Visibility: external public
  53. References:
  54. Referring:
  55. Availability: not_available
  56. Function flags:
  57. Called by: xStreamBufferSend/10
  58. Calls:
  59. xTaskGenericNotifyWait/36 (xTaskGenericNotifyWait) @06b6d700
  60. Type: function
  61. Visibility: external public
  62. References:
  63. Referring:
  64. Availability: not_available
  65. Function flags:
  66. Called by: xStreamBufferReceive/13 xStreamBufferSend/10
  67. Calls:
  68. xTaskGetCurrentTaskHandle/35 (xTaskGetCurrentTaskHandle) @06b6d620
  69. Type: function
  70. Visibility: external public
  71. References:
  72. Referring:
  73. Availability: not_available
  74. Function flags:
  75. Called by: xStreamBufferReceive/13 xStreamBufferSend/10
  76. Calls:
  77. xTaskGenericNotifyStateClear/34 (xTaskGenericNotifyStateClear) @06b6d540
  78. Type: function
  79. Visibility: external public
  80. References:
  81. Referring:
  82. Availability: not_available
  83. Function flags:
  84. Called by: xStreamBufferReceive/13 xStreamBufferSend/10
  85. Calls:
  86. vTaskSetTimeOutState/33 (vTaskSetTimeOutState) @06b6d460
  87. Type: function
  88. Visibility: external public
  89. References:
  90. Referring:
  91. Availability: not_available
  92. Function flags:
  93. Called by: xStreamBufferSend/10
  94. Calls:
  95. vPortExitCritical/32 (vPortExitCritical) @06b63000
  96. Type: function
  97. Visibility: external public
  98. References:
  99. Referring:
  100. Availability: not_available
  101. Function flags:
  102. Called by: xStreamBufferReset/6 xStreamBufferReceive/13 xStreamBufferSend/10 xStreamBufferSend/10
  103. Calls:
  104. vPortEnterCritical/31 (vPortEnterCritical) @06b63ee0
  105. Type: function
  106. Visibility: external public
  107. References:
  108. Referring:
  109. Availability: not_available
  110. Function flags:
  111. Called by: xStreamBufferReset/6 xStreamBufferReceive/13 xStreamBufferSend/10
  112. Calls:
  113. memset/30 (memset) @06b63d20
  114. Type: function
  115. Visibility: external public
  116. References:
  117. Referring:
  118. Availability: not_available
  119. Function flags:
  120. Called by: prvInitialiseNewStreamBuffer/24 prvInitialiseNewStreamBuffer/24 vStreamBufferDelete/5
  121. Calls:
  122. vPortFree/29 (vPortFree) @06b63c40
  123. Type: function
  124. Visibility: external public
  125. References:
  126. Referring:
  127. Availability: not_available
  128. Function flags:
  129. Called by: vStreamBufferDelete/5
  130. Calls:
  131. pvPortMalloc/28 (pvPortMalloc) @06b639a0
  132. Type: function
  133. Visibility: external public
  134. References:
  135. Referring:
  136. Availability: not_available
  137. Function flags:
  138. Called by: xStreamBufferGenericCreate/4
  139. Calls:
  140. ucStreamBufferGetStreamBufferType/27 (ucStreamBufferGetStreamBufferType) @06b63460
  141. Type: function definition analyzed
  142. Visibility: force_output externally_visible no_reorder public
  143. References:
  144. Referring:
  145. Availability: available
  146. Function flags: body
  147. Called by:
  148. Calls:
  149. vStreamBufferSetStreamBufferNumber/26 (vStreamBufferSetStreamBufferNumber) @06b631c0
  150. Type: function definition analyzed
  151. Visibility: force_output externally_visible no_reorder public
  152. References:
  153. Referring:
  154. Availability: available
  155. Function flags: body
  156. Called by:
  157. Calls:
  158. uxStreamBufferGetStreamBufferNumber/25 (uxStreamBufferGetStreamBufferNumber) @06b58d20
  159. Type: function definition analyzed
  160. Visibility: force_output externally_visible no_reorder public
  161. References:
  162. Referring:
  163. Availability: available
  164. Function flags: body
  165. Called by:
  166. Calls:
  167. prvInitialiseNewStreamBuffer/24 (prvInitialiseNewStreamBuffer) @06b58540
  168. Type: function definition analyzed
  169. Visibility: force_output no_reorder prevailing_def_ironly
  170. References:
  171. Referring:
  172. Availability: available
  173. Function flags: body
  174. Called by: xStreamBufferReset/6 xStreamBufferGenericCreate/4
  175. Calls: memset/30 memset/30
  176. prvBytesInBuffer/23 (prvBytesInBuffer) @06b58ee0
  177. Type: function definition analyzed
  178. Visibility: force_output no_reorder prevailing_def_ironly
  179. References:
  180. Referring:
  181. Availability: available
  182. Function flags: body
  183. Called by: xStreamBufferReceiveFromISR/15 xStreamBufferNextMessageLengthBytes/14 xStreamBufferReceive/13 xStreamBufferReceive/13 xStreamBufferReceive/13 xStreamBufferSendFromISR/11 xStreamBufferSend/10 xStreamBufferBytesAvailable/9
  184. Calls:
  185. prvReadBytesFromBuffer/22 (prvReadBytesFromBuffer) @06b58c40
  186. Type: function definition analyzed
  187. Visibility: force_output no_reorder prevailing_def_ironly
  188. References:
  189. Referring:
  190. Availability: available
  191. Function flags: body
  192. Called by: xStreamBufferNextMessageLengthBytes/14 prvReadMessageFromBuffer/16 prvReadMessageFromBuffer/16
  193. Calls: memcpy/42 memcpy/42
  194. prvWriteBytesToBuffer/21 (prvWriteBytesToBuffer) @06b587e0
  195. Type: function definition analyzed
  196. Visibility: force_output no_reorder prevailing_def_ironly
  197. References:
  198. Referring:
  199. Availability: available
  200. Function flags: body
  201. Called by: prvWriteMessageToBuffer/12 prvWriteMessageToBuffer/12
  202. Calls: memcpy/42 memcpy/42
  203. xStreamBufferReceiveCompletedFromISR/20 (xStreamBufferReceiveCompletedFromISR) @06b58460
  204. Type: function definition analyzed
  205. Visibility: force_output externally_visible no_reorder public
  206. References:
  207. Referring:
  208. Availability: available
  209. Function flags: body
  210. Called by:
  211. Calls: xTaskGenericNotifyFromISR/41
  212. xStreamBufferSendCompletedFromISR/19 (xStreamBufferSendCompletedFromISR) @06b580e0
  213. Type: function definition analyzed
  214. Visibility: force_output externally_visible no_reorder public
  215. References:
  216. Referring:
  217. Availability: available
  218. Function flags: body
  219. Called by:
  220. Calls: xTaskGenericNotifyFromISR/41
  221. xStreamBufferIsFull/18 (xStreamBufferIsFull) @06b508c0
  222. Type: function definition analyzed
  223. Visibility: force_output externally_visible no_reorder public
  224. References:
  225. Referring:
  226. Availability: available
  227. Function flags: body
  228. Called by:
  229. Calls: xStreamBufferSpacesAvailable/8
  230. xStreamBufferIsEmpty/17 (xStreamBufferIsEmpty) @06b50ee0
  231. Type: function definition analyzed
  232. Visibility: force_output externally_visible no_reorder public
  233. References:
  234. Referring:
  235. Availability: available
  236. Function flags: body
  237. Called by:
  238. Calls:
  239. prvReadMessageFromBuffer/16 (prvReadMessageFromBuffer) @06b50b60
  240. Type: function definition analyzed
  241. Visibility: force_output no_reorder prevailing_def_ironly
  242. References:
  243. Referring:
  244. Availability: available
  245. Function flags: body
  246. Called by: xStreamBufferReceiveFromISR/15 xStreamBufferReceive/13
  247. Calls: prvReadBytesFromBuffer/22 prvReadBytesFromBuffer/22
  248. xStreamBufferReceiveFromISR/15 (xStreamBufferReceiveFromISR) @06b507e0
  249. Type: function definition analyzed
  250. Visibility: force_output externally_visible no_reorder public
  251. References:
  252. Referring:
  253. Availability: available
  254. Function flags: body
  255. Called by:
  256. Calls: xTaskGenericNotifyFromISR/41 prvReadMessageFromBuffer/16 prvBytesInBuffer/23
  257. xStreamBufferNextMessageLengthBytes/14 (xStreamBufferNextMessageLengthBytes) @06b50380
  258. Type: function definition analyzed
  259. Visibility: force_output externally_visible no_reorder public
  260. References:
  261. Referring:
  262. Availability: available
  263. Function flags: body
  264. Called by:
  265. Calls: prvReadBytesFromBuffer/22 prvBytesInBuffer/23
  266. xStreamBufferReceive/13 (xStreamBufferReceive) @06b04e00
  267. Type: function definition analyzed
  268. Visibility: force_output externally_visible no_reorder public
  269. References:
  270. Referring:
  271. Availability: available
  272. Function flags: body
  273. Called by:
  274. Calls: xTaskResumeAll/40 xTaskGenericNotify/39 vTaskSuspendAll/38 prvReadMessageFromBuffer/16 prvBytesInBuffer/23 prvBytesInBuffer/23 xTaskGenericNotifyWait/36 vPortExitCritical/32 xTaskGetCurrentTaskHandle/35 xTaskGenericNotifyStateClear/34 prvBytesInBuffer/23 vPortEnterCritical/31
  275. prvWriteMessageToBuffer/12 (prvWriteMessageToBuffer) @06b04d20
  276. Type: function definition analyzed
  277. Visibility: force_output no_reorder prevailing_def_ironly
  278. References:
  279. Referring:
  280. Availability: available
  281. Function flags: body
  282. Called by: xStreamBufferSendFromISR/11 xStreamBufferSend/10
  283. Calls: prvWriteBytesToBuffer/21 prvWriteBytesToBuffer/21
  284. xStreamBufferSendFromISR/11 (xStreamBufferSendFromISR) @06b049a0
  285. Type: function definition analyzed
  286. Visibility: force_output externally_visible no_reorder public
  287. References:
  288. Referring:
  289. Availability: available
  290. Function flags: body
  291. Called by:
  292. Calls: xTaskGenericNotifyFromISR/41 prvBytesInBuffer/23 prvWriteMessageToBuffer/12 xStreamBufferSpacesAvailable/8
  293. xStreamBufferSend/10 (xStreamBufferSend) @06b04540
  294. Type: function definition analyzed
  295. Visibility: force_output externally_visible no_reorder public
  296. References:
  297. Referring:
  298. Availability: available
  299. Function flags: body
  300. Called by:
  301. Calls: xTaskResumeAll/40 xTaskGenericNotify/39 vTaskSuspendAll/38 prvBytesInBuffer/23 prvWriteMessageToBuffer/12 xStreamBufferSpacesAvailable/8 xTaskCheckForTimeOut/37 xTaskGenericNotifyWait/36 vPortExitCritical/32 vPortExitCritical/32 xTaskGetCurrentTaskHandle/35 xTaskGenericNotifyStateClear/34 xStreamBufferSpacesAvailable/8 vPortEnterCritical/31 vTaskSetTimeOutState/33
  302. xStreamBufferBytesAvailable/9 (xStreamBufferBytesAvailable) @06afdd20
  303. Type: function definition analyzed
  304. Visibility: force_output externally_visible no_reorder public
  305. References:
  306. Referring:
  307. Availability: available
  308. Function flags: body
  309. Called by:
  310. Calls: prvBytesInBuffer/23
  311. xStreamBufferSpacesAvailable/8 (xStreamBufferSpacesAvailable) @06afd2a0
  312. Type: function definition analyzed
  313. Visibility: force_output externally_visible no_reorder public
  314. References:
  315. Referring:
  316. Availability: available
  317. Function flags: body
  318. Called by: xStreamBufferSendFromISR/11 xStreamBufferSend/10 xStreamBufferSend/10 xStreamBufferIsFull/18
  319. Calls:
  320. xStreamBufferSetTriggerLevel/7 (xStreamBufferSetTriggerLevel) @06afdc40
  321. Type: function definition analyzed
  322. Visibility: force_output externally_visible no_reorder public
  323. References:
  324. Referring:
  325. Availability: available
  326. Function flags: body
  327. Called by:
  328. Calls:
  329. xStreamBufferReset/6 (xStreamBufferReset) @06afd8c0
  330. Type: function definition analyzed
  331. Visibility: force_output externally_visible no_reorder public
  332. References:
  333. Referring:
  334. Availability: available
  335. Function flags: body
  336. Called by:
  337. Calls: vPortExitCritical/32 prvInitialiseNewStreamBuffer/24 vPortEnterCritical/31
  338. vStreamBufferDelete/5 (vStreamBufferDelete) @06afd540
  339. Type: function definition analyzed
  340. Visibility: force_output externally_visible no_reorder public
  341. References:
  342. Referring:
  343. Availability: available
  344. Function flags: body
  345. Called by:
  346. Calls: memset/30 vPortFree/29
  347. xStreamBufferGenericCreate/4 (xStreamBufferGenericCreate) @06afd1c0
  348. Type: function definition analyzed
  349. Visibility: force_output externally_visible no_reorder public
  350. References:
  351. Referring:
  352. Availability: available
  353. Function flags: body
  354. Called by:
  355. Calls: prvInitialiseNewStreamBuffer/24 pvPortMalloc/28
  356. ucStreamBufferGetStreamBufferType (struct StreamBufferDef_t * xStreamBuffer)
  357. {
  358. uint8_t D.6586;
  359. unsigned char _1;
  360. uint8_t _4;
  361. <bb 2> :
  362. _1 = xStreamBuffer_3(D)->ucFlags;
  363. _4 = _1 & 1;
  364. <bb 3> :
  365. <L0>:
  366. return _4;
  367. }
  368. vStreamBufferSetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer, UBaseType_t uxStreamBufferNumber)
  369. {
  370. <bb 2> :
  371. xStreamBuffer_2(D)->uxStreamBufferNumber = uxStreamBufferNumber_3(D);
  372. return;
  373. }
  374. uxStreamBufferGetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer)
  375. {
  376. UBaseType_t D.6584;
  377. UBaseType_t _3;
  378. <bb 2> :
  379. _3 = xStreamBuffer_2(D)->uxStreamBufferNumber;
  380. <bb 3> :
  381. <L0>:
  382. return _3;
  383. }
  384. prvInitialiseNewStreamBuffer (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
  385. {
  386. uint32_t ulNewBASEPRI;
  387. const BaseType_t xWriteValue;
  388. void * _1;
  389. <bb 2> :
  390. xWriteValue_2 = 85;
  391. _1 = memset (pucBuffer_4(D), xWriteValue_2, xBufferSizeBytes_5(D));
  392. if (pucBuffer_4(D) != _1)
  393. goto <bb 3>; [INV]
  394. else
  395. goto <bb 6>; [INV]
  396. <bb 3> :
  397. __asm__ __volatile__(" mov %0, %1
  398. msr basepri, %0
  399. isb
  400. dsb
  401. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  402. <bb 4> :
  403. <bb 5> :
  404. goto <bb 5>; [INV]
  405. <bb 6> :
  406. memset (pxStreamBuffer_7(D), 0, 36);
  407. pxStreamBuffer_7(D)->pucBuffer = pucBuffer_4(D);
  408. pxStreamBuffer_7(D)->xLength = xBufferSizeBytes_5(D);
  409. pxStreamBuffer_7(D)->xTriggerLevelBytes = xTriggerLevelBytes_11(D);
  410. pxStreamBuffer_7(D)->ucFlags = ucFlags_13(D);
  411. return;
  412. }
  413. prvBytesInBuffer (const struct StreamBuffer_t * const pxStreamBuffer)
  414. {
  415. size_t xCount;
  416. size_t D.6580;
  417. unsigned int D.6576;
  418. unsigned int _1;
  419. unsigned int _2;
  420. unsigned int _3;
  421. unsigned int _4;
  422. unsigned int _9;
  423. size_t _12;
  424. <bb 2> :
  425. _1 = pxStreamBuffer_7(D)->xLength;
  426. _2 ={v} pxStreamBuffer_7(D)->xHead;
  427. xCount_8 = _1 + _2;
  428. _9 ={v} pxStreamBuffer_7(D)->xTail;
  429. xCount_10 = xCount_8 - _9;
  430. _3 = pxStreamBuffer_7(D)->xLength;
  431. if (xCount_10 >= _3)
  432. goto <bb 3>; [INV]
  433. else
  434. goto <bb 4>; [INV]
  435. <bb 3> :
  436. _4 = pxStreamBuffer_7(D)->xLength;
  437. xCount_11 = xCount_10 - _4;
  438. <bb 4> :
  439. # xCount_5 = PHI <xCount_10(2), xCount_11(3)>
  440. _12 = xCount_5;
  441. <bb 5> :
  442. <L3>:
  443. return _12;
  444. }
  445. prvReadBytesFromBuffer (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
  446. {
  447. uint32_t ulNewBASEPRI;
  448. uint32_t ulNewBASEPRI;
  449. uint32_t ulNewBASEPRI;
  450. size_t xFirstLength;
  451. size_t D.6574;
  452. unsigned int _1;
  453. unsigned int _2;
  454. unsigned int _3;
  455. unsigned int _4;
  456. uint8_t * _5;
  457. uint8_t * _6;
  458. uint8_t * _7;
  459. uint8_t * _8;
  460. unsigned int _9;
  461. unsigned int _10;
  462. unsigned int _11;
  463. size_t _24;
  464. <bb 2> :
  465. if (xCount_14(D) == 0)
  466. goto <bb 3>; [INV]
  467. else
  468. goto <bb 6>; [INV]
  469. <bb 3> :
  470. __asm__ __volatile__(" mov %0, %1
  471. msr basepri, %0
  472. isb
  473. dsb
  474. " : "=r" ulNewBASEPRI_25 : "i" 16 : "memory");
  475. <bb 4> :
  476. <bb 5> :
  477. goto <bb 5>; [INV]
  478. <bb 6> :
  479. _1 = pxStreamBuffer_16(D)->xLength;
  480. _2 = _1 - xTail_17(D);
  481. xFirstLength_18 = MIN_EXPR <xCount_14(D), _2>;
  482. if (xFirstLength_18 > xCount_14(D))
  483. goto <bb 7>; [INV]
  484. else
  485. goto <bb 10>; [INV]
  486. <bb 7> :
  487. __asm__ __volatile__(" mov %0, %1
  488. msr basepri, %0
  489. isb
  490. dsb
  491. " : "=r" ulNewBASEPRI_26 : "i" 16 : "memory");
  492. <bb 8> :
  493. <bb 9> :
  494. goto <bb 9>; [INV]
  495. <bb 10> :
  496. _3 = xTail_17(D) + xFirstLength_18;
  497. _4 = pxStreamBuffer_16(D)->xLength;
  498. if (_3 > _4)
  499. goto <bb 11>; [INV]
  500. else
  501. goto <bb 14>; [INV]
  502. <bb 11> :
  503. __asm__ __volatile__(" mov %0, %1
  504. msr basepri, %0
  505. isb
  506. dsb
  507. " : "=r" ulNewBASEPRI_27 : "i" 16 : "memory");
  508. <bb 12> :
  509. <bb 13> :
  510. goto <bb 13>; [INV]
  511. <bb 14> :
  512. _5 = pxStreamBuffer_16(D)->pucBuffer;
  513. _6 = _5 + xTail_17(D);
  514. memcpy (pucData_19(D), _6, xFirstLength_18);
  515. if (xCount_14(D) > xFirstLength_18)
  516. goto <bb 15>; [INV]
  517. else
  518. goto <bb 16>; [INV]
  519. <bb 15> :
  520. _7 = pucData_19(D) + xFirstLength_18;
  521. _8 = pxStreamBuffer_16(D)->pucBuffer;
  522. _9 = xCount_14(D) - xFirstLength_18;
  523. memcpy (_7, _8, _9);
  524. <bb 16> :
  525. xTail_22 = xTail_17(D) + xCount_14(D);
  526. _10 = pxStreamBuffer_16(D)->xLength;
  527. if (xTail_22 >= _10)
  528. goto <bb 17>; [INV]
  529. else
  530. goto <bb 18>; [INV]
  531. <bb 17> :
  532. _11 = pxStreamBuffer_16(D)->xLength;
  533. xTail_23 = xTail_22 - _11;
  534. <bb 18> :
  535. # xTail_12 = PHI <xTail_22(16), xTail_23(17)>
  536. _24 = xTail_12;
  537. <bb 19> :
  538. <L14>:
  539. return _24;
  540. }
  541. prvWriteBytesToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
  542. {
  543. uint32_t ulNewBASEPRI;
  544. uint32_t ulNewBASEPRI;
  545. uint32_t ulNewBASEPRI;
  546. size_t xFirstLength;
  547. size_t D.6561;
  548. unsigned int _1;
  549. unsigned int _2;
  550. unsigned int _3;
  551. unsigned int _4;
  552. uint8_t * _5;
  553. uint8_t * _6;
  554. unsigned int _7;
  555. unsigned int _8;
  556. uint8_t * _9;
  557. const uint8_t * _10;
  558. unsigned int _11;
  559. unsigned int _12;
  560. unsigned int _13;
  561. size_t _26;
  562. <bb 2> :
  563. if (xCount_16(D) == 0)
  564. goto <bb 3>; [INV]
  565. else
  566. goto <bb 6>; [INV]
  567. <bb 3> :
  568. __asm__ __volatile__(" mov %0, %1
  569. msr basepri, %0
  570. isb
  571. dsb
  572. " : "=r" ulNewBASEPRI_27 : "i" 16 : "memory");
  573. <bb 4> :
  574. <bb 5> :
  575. goto <bb 5>; [INV]
  576. <bb 6> :
  577. _1 = pxStreamBuffer_18(D)->xLength;
  578. _2 = _1 - xHead_19(D);
  579. xFirstLength_20 = MIN_EXPR <xCount_16(D), _2>;
  580. _3 = xHead_19(D) + xFirstLength_20;
  581. _4 = pxStreamBuffer_18(D)->xLength;
  582. if (_3 > _4)
  583. goto <bb 7>; [INV]
  584. else
  585. goto <bb 10>; [INV]
  586. <bb 7> :
  587. __asm__ __volatile__(" mov %0, %1
  588. msr basepri, %0
  589. isb
  590. dsb
  591. " : "=r" ulNewBASEPRI_28 : "i" 16 : "memory");
  592. <bb 8> :
  593. <bb 9> :
  594. goto <bb 9>; [INV]
  595. <bb 10> :
  596. _5 = pxStreamBuffer_18(D)->pucBuffer;
  597. _6 = _5 + xHead_19(D);
  598. memcpy (_6, pucData_21(D), xFirstLength_20);
  599. if (xCount_16(D) > xFirstLength_20)
  600. goto <bb 11>; [INV]
  601. else
  602. goto <bb 16>; [INV]
  603. <bb 11> :
  604. _7 = xCount_16(D) - xFirstLength_20;
  605. _8 = pxStreamBuffer_18(D)->xLength;
  606. if (_7 > _8)
  607. goto <bb 12>; [INV]
  608. else
  609. goto <bb 15>; [INV]
  610. <bb 12> :
  611. __asm__ __volatile__(" mov %0, %1
  612. msr basepri, %0
  613. isb
  614. dsb
  615. " : "=r" ulNewBASEPRI_29 : "i" 16 : "memory");
  616. <bb 13> :
  617. <bb 14> :
  618. goto <bb 14>; [INV]
  619. <bb 15> :
  620. _9 = pxStreamBuffer_18(D)->pucBuffer;
  621. _10 = pucData_21(D) + xFirstLength_20;
  622. _11 = xCount_16(D) - xFirstLength_20;
  623. memcpy (_9, _10, _11);
  624. <bb 16> :
  625. xHead_24 = xHead_19(D) + xCount_16(D);
  626. _12 = pxStreamBuffer_18(D)->xLength;
  627. if (xHead_24 >= _12)
  628. goto <bb 17>; [INV]
  629. else
  630. goto <bb 18>; [INV]
  631. <bb 17> :
  632. _13 = pxStreamBuffer_18(D)->xLength;
  633. xHead_25 = xHead_24 - _13;
  634. <bb 18> :
  635. # xHead_14 = PHI <xHead_24(16), xHead_25(17)>
  636. _26 = xHead_14;
  637. <bb 19> :
  638. <L15>:
  639. return _26;
  640. }
  641. xStreamBufferReceiveCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  642. {
  643. uint32_t ulNewMaskValue;
  644. uint32_t D.6631;
  645. uint32_t ulOriginalBASEPRI;
  646. uint32_t ulNewBASEPRI;
  647. uint32_t D.6630;
  648. uint32_t ulNewBASEPRI;
  649. UBaseType_t uxSavedInterruptStatus;
  650. BaseType_t xReturn;
  651. struct StreamBuffer_t * const pxStreamBuffer;
  652. BaseType_t D.6547;
  653. struct tskTaskControlBlock * _1;
  654. struct tskTaskControlBlock * _2;
  655. BaseType_t _14;
  656. long unsigned int _18;
  657. <bb 2> :
  658. pxStreamBuffer_6 = xStreamBuffer_5(D);
  659. if (pxStreamBuffer_6 == 0B)
  660. goto <bb 3>; [INV]
  661. else
  662. goto <bb 6>; [INV]
  663. <bb 3> :
  664. __asm__ __volatile__(" mov %0, %1
  665. msr basepri, %0
  666. isb
  667. dsb
  668. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  669. <bb 4> :
  670. <bb 5> :
  671. goto <bb 5>; [INV]
  672. <bb 6> :
  673. __asm__ __volatile__(" mrs %0, basepri
  674. mov %1, %2
  675. msr basepri, %1
  676. isb
  677. dsb
  678. " : "=r" ulOriginalBASEPRI_16, "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
  679. _18 = ulOriginalBASEPRI_16;
  680. <bb 7> :
  681. <L7>:
  682. _21 = _18;
  683. <bb 8> :
  684. uxSavedInterruptStatus_8 = _21;
  685. _1 ={v} pxStreamBuffer_6->xTaskWaitingToSend;
  686. if (_1 != 0B)
  687. goto <bb 9>; [INV]
  688. else
  689. goto <bb 10>; [INV]
  690. <bb 9> :
  691. _2 ={v} pxStreamBuffer_6->xTaskWaitingToSend;
  692. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_10(D));
  693. pxStreamBuffer_6->xTaskWaitingToSend ={v} 0B;
  694. xReturn_13 = 1;
  695. goto <bb 11>; [INV]
  696. <bb 10> :
  697. xReturn_9 = 0;
  698. <bb 11> :
  699. # xReturn_3 = PHI <xReturn_13(9), xReturn_9(10)>
  700. ulNewMaskValue_19 = uxSavedInterruptStatus_8;
  701. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_19 : "memory");
  702. <bb 12> :
  703. _14 = xReturn_3;
  704. <bb 13> :
  705. <L6>:
  706. return _14;
  707. }
  708. xStreamBufferSendCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  709. {
  710. uint32_t ulNewMaskValue;
  711. uint32_t D.6624;
  712. uint32_t ulOriginalBASEPRI;
  713. uint32_t ulNewBASEPRI;
  714. uint32_t D.6623;
  715. uint32_t ulNewBASEPRI;
  716. UBaseType_t uxSavedInterruptStatus;
  717. BaseType_t xReturn;
  718. struct StreamBuffer_t * const pxStreamBuffer;
  719. BaseType_t D.6540;
  720. struct tskTaskControlBlock * _1;
  721. struct tskTaskControlBlock * _2;
  722. BaseType_t _14;
  723. long unsigned int _18;
  724. <bb 2> :
  725. pxStreamBuffer_6 = xStreamBuffer_5(D);
  726. if (pxStreamBuffer_6 == 0B)
  727. goto <bb 3>; [INV]
  728. else
  729. goto <bb 6>; [INV]
  730. <bb 3> :
  731. __asm__ __volatile__(" mov %0, %1
  732. msr basepri, %0
  733. isb
  734. dsb
  735. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  736. <bb 4> :
  737. <bb 5> :
  738. goto <bb 5>; [INV]
  739. <bb 6> :
  740. __asm__ __volatile__(" mrs %0, basepri
  741. mov %1, %2
  742. msr basepri, %1
  743. isb
  744. dsb
  745. " : "=r" ulOriginalBASEPRI_16, "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
  746. _18 = ulOriginalBASEPRI_16;
  747. <bb 7> :
  748. <L7>:
  749. _21 = _18;
  750. <bb 8> :
  751. uxSavedInterruptStatus_8 = _21;
  752. _1 ={v} pxStreamBuffer_6->xTaskWaitingToReceive;
  753. if (_1 != 0B)
  754. goto <bb 9>; [INV]
  755. else
  756. goto <bb 10>; [INV]
  757. <bb 9> :
  758. _2 ={v} pxStreamBuffer_6->xTaskWaitingToReceive;
  759. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_10(D));
  760. pxStreamBuffer_6->xTaskWaitingToReceive ={v} 0B;
  761. xReturn_13 = 1;
  762. goto <bb 11>; [INV]
  763. <bb 10> :
  764. xReturn_9 = 0;
  765. <bb 11> :
  766. # xReturn_3 = PHI <xReturn_13(9), xReturn_9(10)>
  767. ulNewMaskValue_19 = uxSavedInterruptStatus_8;
  768. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_19 : "memory");
  769. <bb 12> :
  770. _14 = xReturn_3;
  771. <bb 13> :
  772. <L6>:
  773. return _14;
  774. }
  775. xStreamBufferIsFull (struct StreamBufferDef_t * xStreamBuffer)
  776. {
  777. uint32_t ulNewBASEPRI;
  778. const struct StreamBuffer_t * const pxStreamBuffer;
  779. size_t xBytesToStoreMessageLength;
  780. BaseType_t xReturn;
  781. BaseType_t D.6533;
  782. unsigned char _1;
  783. int _2;
  784. int _3;
  785. unsigned int _4;
  786. BaseType_t _15;
  787. <bb 2> :
  788. pxStreamBuffer_8 = xStreamBuffer_7(D);
  789. if (pxStreamBuffer_8 == 0B)
  790. goto <bb 3>; [INV]
  791. else
  792. goto <bb 6>; [INV]
  793. <bb 3> :
  794. __asm__ __volatile__(" mov %0, %1
  795. msr basepri, %0
  796. isb
  797. dsb
  798. " : "=r" ulNewBASEPRI_16 : "i" 16 : "memory");
  799. <bb 4> :
  800. <bb 5> :
  801. goto <bb 5>; [INV]
  802. <bb 6> :
  803. _1 = pxStreamBuffer_8->ucFlags;
  804. _2 = (int) _1;
  805. _3 = _2 & 1;
  806. if (_3 != 0)
  807. goto <bb 7>; [INV]
  808. else
  809. goto <bb 8>; [INV]
  810. <bb 7> :
  811. xBytesToStoreMessageLength_11 = 4;
  812. goto <bb 9>; [INV]
  813. <bb 8> :
  814. xBytesToStoreMessageLength_10 = 0;
  815. <bb 9> :
  816. # xBytesToStoreMessageLength_6 = PHI <xBytesToStoreMessageLength_11(7), xBytesToStoreMessageLength_10(8)>
  817. _4 = xStreamBufferSpacesAvailable (xStreamBuffer_7(D));
  818. if (xBytesToStoreMessageLength_6 >= _4)
  819. goto <bb 10>; [INV]
  820. else
  821. goto <bb 11>; [INV]
  822. <bb 10> :
  823. xReturn_14 = 1;
  824. goto <bb 12>; [INV]
  825. <bb 11> :
  826. xReturn_13 = 0;
  827. <bb 12> :
  828. # xReturn_5 = PHI <xReturn_14(10), xReturn_13(11)>
  829. _15 = xReturn_5;
  830. <bb 13> :
  831. <L9>:
  832. return _15;
  833. }
  834. xStreamBufferIsEmpty (struct StreamBufferDef_t * xStreamBuffer)
  835. {
  836. uint32_t ulNewBASEPRI;
  837. size_t xTail;
  838. BaseType_t xReturn;
  839. const struct StreamBuffer_t * const pxStreamBuffer;
  840. BaseType_t D.6523;
  841. unsigned int _1;
  842. BaseType_t _9;
  843. <bb 2> :
  844. pxStreamBuffer_4 = xStreamBuffer_3(D);
  845. if (pxStreamBuffer_4 == 0B)
  846. goto <bb 3>; [INV]
  847. else
  848. goto <bb 6>; [INV]
  849. <bb 3> :
  850. __asm__ __volatile__(" mov %0, %1
  851. msr basepri, %0
  852. isb
  853. dsb
  854. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  855. <bb 4> :
  856. <bb 5> :
  857. goto <bb 5>; [INV]
  858. <bb 6> :
  859. xTail_6 ={v} pxStreamBuffer_4->xTail;
  860. _1 ={v} pxStreamBuffer_4->xHead;
  861. if (xTail_6 == _1)
  862. goto <bb 7>; [INV]
  863. else
  864. goto <bb 8>; [INV]
  865. <bb 7> :
  866. xReturn_8 = 1;
  867. goto <bb 9>; [INV]
  868. <bb 8> :
  869. xReturn_7 = 0;
  870. <bb 9> :
  871. # xReturn_2 = PHI <xReturn_8(7), xReturn_7(8)>
  872. _9 = xReturn_2;
  873. <bb 10> :
  874. <L6>:
  875. return _9;
  876. }
  877. prvReadMessageFromBuffer (struct StreamBuffer_t * pxStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable)
  878. {
  879. size_t xNextTail;
  880. size_t xTempNextMessageLength;
  881. size_t xNextMessageLength;
  882. size_t xCount;
  883. size_t D.6515;
  884. unsigned char _1;
  885. int _2;
  886. int _3;
  887. unsigned int _4;
  888. size_t _25;
  889. <bb 2> :
  890. xNextTail_12 ={v} pxStreamBuffer_11(D)->xTail;
  891. _1 = pxStreamBuffer_11(D)->ucFlags;
  892. _2 = (int) _1;
  893. _3 = _2 & 1;
  894. if (_3 != 0)
  895. goto <bb 3>; [INV]
  896. else
  897. goto <bb 5>; [INV]
  898. <bb 3> :
  899. xNextTail_17 = prvReadBytesFromBuffer (pxStreamBuffer_11(D), &xTempNextMessageLength, 4, xNextTail_12);
  900. xNextMessageLength_18 = xTempNextMessageLength;
  901. xBytesAvailable_19 = xBytesAvailable_15(D) + 4294967292;
  902. if (xNextMessageLength_18 > xBufferLengthBytes_13(D))
  903. goto <bb 4>; [INV]
  904. else
  905. goto <bb 6>; [INV]
  906. <bb 4> :
  907. xNextMessageLength_20 = 0;
  908. goto <bb 6>; [INV]
  909. <bb 5> :
  910. xNextMessageLength_14 = xBufferLengthBytes_13(D);
  911. <bb 6> :
  912. # xBytesAvailable_5 = PHI <xBytesAvailable_19(4), xBytesAvailable_15(D)(5), xBytesAvailable_19(3)>
  913. # xNextMessageLength_6 = PHI <xNextMessageLength_20(4), xNextMessageLength_14(5), xNextMessageLength_18(3)>
  914. # xNextTail_7 = PHI <xNextTail_17(4), xNextTail_12(5), xNextTail_17(3)>
  915. xCount_21 = MIN_EXPR <xBytesAvailable_5, xNextMessageLength_6>;
  916. if (xCount_21 != 0)
  917. goto <bb 7>; [INV]
  918. else
  919. goto <bb 8>; [INV]
  920. <bb 7> :
  921. _4 = prvReadBytesFromBuffer (pxStreamBuffer_11(D), pvRxData_22(D), xCount_21, xNextTail_7);
  922. pxStreamBuffer_11(D)->xTail ={v} _4;
  923. <bb 8> :
  924. _25 = xCount_21;
  925. xTempNextMessageLength ={v} {CLOBBER};
  926. <bb 9> :
  927. <L9>:
  928. return _25;
  929. }
  930. xStreamBufferReceiveFromISR (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  931. {
  932. uint32_t ulNewMaskValue;
  933. uint32_t D.6663;
  934. uint32_t ulOriginalBASEPRI;
  935. uint32_t ulNewBASEPRI;
  936. uint32_t D.6662;
  937. uint32_t ulNewBASEPRI;
  938. uint32_t ulNewBASEPRI;
  939. UBaseType_t uxSavedInterruptStatus;
  940. size_t xBytesToStoreMessageLength;
  941. size_t xBytesAvailable;
  942. size_t xReceivedLength;
  943. struct StreamBuffer_t * const pxStreamBuffer;
  944. size_t D.6505;
  945. unsigned char _1;
  946. int _2;
  947. int _3;
  948. struct tskTaskControlBlock * _4;
  949. struct tskTaskControlBlock * _5;
  950. size_t _26;
  951. long unsigned int _31;
  952. <bb 2> :
  953. pxStreamBuffer_11 = xStreamBuffer_10(D);
  954. xReceivedLength_12 = 0;
  955. if (pvRxData_13(D) == 0B)
  956. goto <bb 3>; [INV]
  957. else
  958. goto <bb 6>; [INV]
  959. <bb 3> :
  960. __asm__ __volatile__(" mov %0, %1
  961. msr basepri, %0
  962. isb
  963. dsb
  964. " : "=r" ulNewBASEPRI_27 : "i" 16 : "memory");
  965. <bb 4> :
  966. <bb 5> :
  967. goto <bb 5>; [INV]
  968. <bb 6> :
  969. if (pxStreamBuffer_11 == 0B)
  970. goto <bb 7>; [INV]
  971. else
  972. goto <bb 10>; [INV]
  973. <bb 7> :
  974. __asm__ __volatile__(" mov %0, %1
  975. msr basepri, %0
  976. isb
  977. dsb
  978. " : "=r" ulNewBASEPRI_28 : "i" 16 : "memory");
  979. <bb 8> :
  980. <bb 9> :
  981. goto <bb 9>; [INV]
  982. <bb 10> :
  983. _1 = pxStreamBuffer_11->ucFlags;
  984. _2 = (int) _1;
  985. _3 = _2 & 1;
  986. if (_3 != 0)
  987. goto <bb 11>; [INV]
  988. else
  989. goto <bb 12>; [INV]
  990. <bb 11> :
  991. xBytesToStoreMessageLength_16 = 4;
  992. goto <bb 13>; [INV]
  993. <bb 12> :
  994. xBytesToStoreMessageLength_15 = 0;
  995. <bb 13> :
  996. # xBytesToStoreMessageLength_7 = PHI <xBytesToStoreMessageLength_16(11), xBytesToStoreMessageLength_15(12)>
  997. xBytesAvailable_18 = prvBytesInBuffer (pxStreamBuffer_11);
  998. if (xBytesAvailable_18 > xBytesToStoreMessageLength_7)
  999. goto <bb 14>; [INV]
  1000. else
  1001. goto <bb 21>; [INV]
  1002. <bb 14> :
  1003. xReceivedLength_21 = prvReadMessageFromBuffer (pxStreamBuffer_11, pvRxData_13(D), xBufferLengthBytes_19(D), xBytesAvailable_18);
  1004. if (xReceivedLength_21 != 0)
  1005. goto <bb 15>; [INV]
  1006. else
  1007. goto <bb 21>; [INV]
  1008. <bb 15> :
  1009. __asm__ __volatile__(" mrs %0, basepri
  1010. mov %1, %2
  1011. msr basepri, %1
  1012. isb
  1013. dsb
  1014. " : "=r" ulOriginalBASEPRI_29, "=r" ulNewBASEPRI_30 : "i" 16 : "memory");
  1015. _31 = ulOriginalBASEPRI_29;
  1016. <bb 16> :
  1017. <L18>:
  1018. _34 = _31;
  1019. <bb 17> :
  1020. uxSavedInterruptStatus_22 = _34;
  1021. _4 ={v} pxStreamBuffer_11->xTaskWaitingToSend;
  1022. if (_4 != 0B)
  1023. goto <bb 18>; [INV]
  1024. else
  1025. goto <bb 19>; [INV]
  1026. <bb 18> :
  1027. _5 ={v} pxStreamBuffer_11->xTaskWaitingToSend;
  1028. xTaskGenericNotifyFromISR (_5, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_23(D));
  1029. pxStreamBuffer_11->xTaskWaitingToSend ={v} 0B;
  1030. <bb 19> :
  1031. ulNewMaskValue_32 = uxSavedInterruptStatus_22;
  1032. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_32 : "memory");
  1033. <bb 20> :
  1034. <bb 21> :
  1035. # xReceivedLength_6 = PHI <xReceivedLength_12(13), xReceivedLength_21(20), xReceivedLength_21(14)>
  1036. _26 = xReceivedLength_6;
  1037. <bb 22> :
  1038. <L17>:
  1039. return _26;
  1040. }
  1041. xStreamBufferNextMessageLengthBytes (struct StreamBufferDef_t * xStreamBuffer)
  1042. {
  1043. uint32_t ulNewBASEPRI;
  1044. uint32_t ulNewBASEPRI;
  1045. size_t xTempReturn;
  1046. size_t xBytesAvailable;
  1047. size_t xReturn;
  1048. struct StreamBuffer_t * const pxStreamBuffer;
  1049. size_t D.6487;
  1050. unsigned char _1;
  1051. int _2;
  1052. int _3;
  1053. unsigned int _4;
  1054. size_t _16;
  1055. <bb 2> :
  1056. pxStreamBuffer_8 = xStreamBuffer_7(D);
  1057. if (pxStreamBuffer_8 == 0B)
  1058. goto <bb 3>; [INV]
  1059. else
  1060. goto <bb 6>; [INV]
  1061. <bb 3> :
  1062. __asm__ __volatile__(" mov %0, %1
  1063. msr basepri, %0
  1064. isb
  1065. dsb
  1066. " : "=r" ulNewBASEPRI_18 : "i" 16 : "memory");
  1067. <bb 4> :
  1068. <bb 5> :
  1069. goto <bb 5>; [INV]
  1070. <bb 6> :
  1071. _1 = pxStreamBuffer_8->ucFlags;
  1072. _2 = (int) _1;
  1073. _3 = _2 & 1;
  1074. if (_3 != 0)
  1075. goto <bb 7>; [INV]
  1076. else
  1077. goto <bb 14>; [INV]
  1078. <bb 7> :
  1079. xBytesAvailable_12 = prvBytesInBuffer (pxStreamBuffer_8);
  1080. if (xBytesAvailable_12 > 4)
  1081. goto <bb 8>; [INV]
  1082. else
  1083. goto <bb 9>; [INV]
  1084. <bb 8> :
  1085. _4 ={v} pxStreamBuffer_8->xTail;
  1086. prvReadBytesFromBuffer (pxStreamBuffer_8, &xTempReturn, 4, _4);
  1087. xReturn_15 = xTempReturn;
  1088. goto <bb 15>; [INV]
  1089. <bb 9> :
  1090. if (xBytesAvailable_12 != 0)
  1091. goto <bb 10>; [INV]
  1092. else
  1093. goto <bb 13>; [INV]
  1094. <bb 10> :
  1095. __asm__ __volatile__(" mov %0, %1
  1096. msr basepri, %0
  1097. isb
  1098. dsb
  1099. " : "=r" ulNewBASEPRI_19 : "i" 16 : "memory");
  1100. <bb 11> :
  1101. <bb 12> :
  1102. goto <bb 12>; [INV]
  1103. <bb 13> :
  1104. xReturn_13 = 0;
  1105. goto <bb 15>; [INV]
  1106. <bb 14> :
  1107. xReturn_10 = 0;
  1108. <bb 15> :
  1109. # xReturn_5 = PHI <xReturn_13(13), xReturn_10(14), xReturn_15(8)>
  1110. _16 = xReturn_5;
  1111. xTempReturn ={v} {CLOBBER};
  1112. <bb 16> :
  1113. <L13>:
  1114. return _16;
  1115. }
  1116. xStreamBufferReceive (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait)
  1117. {
  1118. uint32_t ulNewBASEPRI;
  1119. uint32_t ulNewBASEPRI;
  1120. uint32_t ulNewBASEPRI;
  1121. size_t xBytesToStoreMessageLength;
  1122. size_t xBytesAvailable;
  1123. size_t xReceivedLength;
  1124. struct StreamBuffer_t * const pxStreamBuffer;
  1125. size_t D.6475;
  1126. unsigned char _1;
  1127. int _2;
  1128. int _3;
  1129. struct tskTaskControlBlock * _4;
  1130. struct tskTaskControlBlock * _5;
  1131. struct tskTaskControlBlock * _6;
  1132. struct tskTaskControlBlock * _7;
  1133. size_t _43;
  1134. <bb 2> :
  1135. pxStreamBuffer_16 = xStreamBuffer_15(D);
  1136. xReceivedLength_17 = 0;
  1137. if (pvRxData_18(D) == 0B)
  1138. goto <bb 3>; [INV]
  1139. else
  1140. goto <bb 6>; [INV]
  1141. <bb 3> :
  1142. __asm__ __volatile__(" mov %0, %1
  1143. msr basepri, %0
  1144. isb
  1145. dsb
  1146. " : "=r" ulNewBASEPRI_44 : "i" 16 : "memory");
  1147. <bb 4> :
  1148. <bb 5> :
  1149. goto <bb 5>; [INV]
  1150. <bb 6> :
  1151. if (pxStreamBuffer_16 == 0B)
  1152. goto <bb 7>; [INV]
  1153. else
  1154. goto <bb 10>; [INV]
  1155. <bb 7> :
  1156. __asm__ __volatile__(" mov %0, %1
  1157. msr basepri, %0
  1158. isb
  1159. dsb
  1160. " : "=r" ulNewBASEPRI_45 : "i" 16 : "memory");
  1161. <bb 8> :
  1162. <bb 9> :
  1163. goto <bb 9>; [INV]
  1164. <bb 10> :
  1165. _1 = pxStreamBuffer_16->ucFlags;
  1166. _2 = (int) _1;
  1167. _3 = _2 & 1;
  1168. if (_3 != 0)
  1169. goto <bb 11>; [INV]
  1170. else
  1171. goto <bb 12>; [INV]
  1172. <bb 11> :
  1173. xBytesToStoreMessageLength_21 = 4;
  1174. goto <bb 13>; [INV]
  1175. <bb 12> :
  1176. xBytesToStoreMessageLength_20 = 0;
  1177. <bb 13> :
  1178. # xBytesToStoreMessageLength_10 = PHI <xBytesToStoreMessageLength_21(11), xBytesToStoreMessageLength_20(12)>
  1179. if (xTicksToWait_22(D) != 0)
  1180. goto <bb 14>; [INV]
  1181. else
  1182. goto <bb 22>; [INV]
  1183. <bb 14> :
  1184. vPortEnterCritical ();
  1185. xBytesAvailable_27 = prvBytesInBuffer (pxStreamBuffer_16);
  1186. if (xBytesAvailable_27 <= xBytesToStoreMessageLength_10)
  1187. goto <bb 15>; [INV]
  1188. else
  1189. goto <bb 20>; [INV]
  1190. <bb 15> :
  1191. xTaskGenericNotifyStateClear (0B, 0);
  1192. _4 ={v} pxStreamBuffer_16->xTaskWaitingToReceive;
  1193. if (_4 != 0B)
  1194. goto <bb 16>; [INV]
  1195. else
  1196. goto <bb 19>; [INV]
  1197. <bb 16> :
  1198. __asm__ __volatile__(" mov %0, %1
  1199. msr basepri, %0
  1200. isb
  1201. dsb
  1202. " : "=r" ulNewBASEPRI_46 : "i" 16 : "memory");
  1203. <bb 17> :
  1204. <bb 18> :
  1205. goto <bb 18>; [INV]
  1206. <bb 19> :
  1207. _5 = xTaskGetCurrentTaskHandle ();
  1208. pxStreamBuffer_16->xTaskWaitingToReceive ={v} _5;
  1209. <bb 20> :
  1210. vPortExitCritical ();
  1211. if (xBytesAvailable_27 <= xBytesToStoreMessageLength_10)
  1212. goto <bb 21>; [INV]
  1213. else
  1214. goto <bb 23>; [INV]
  1215. <bb 21> :
  1216. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait_22(D));
  1217. pxStreamBuffer_16->xTaskWaitingToReceive ={v} 0B;
  1218. xBytesAvailable_35 = prvBytesInBuffer (pxStreamBuffer_16);
  1219. goto <bb 23>; [INV]
  1220. <bb 22> :
  1221. xBytesAvailable_24 = prvBytesInBuffer (pxStreamBuffer_16);
  1222. <bb 23> :
  1223. # xBytesAvailable_9 = PHI <xBytesAvailable_35(21), xBytesAvailable_24(22), xBytesAvailable_27(20)>
  1224. if (xBytesAvailable_9 > xBytesToStoreMessageLength_10)
  1225. goto <bb 24>; [INV]
  1226. else
  1227. goto <bb 28>; [INV]
  1228. <bb 24> :
  1229. xReceivedLength_38 = prvReadMessageFromBuffer (pxStreamBuffer_16, pvRxData_18(D), xBufferLengthBytes_36(D), xBytesAvailable_9);
  1230. if (xReceivedLength_38 != 0)
  1231. goto <bb 25>; [INV]
  1232. else
  1233. goto <bb 28>; [INV]
  1234. <bb 25> :
  1235. vTaskSuspendAll ();
  1236. _6 ={v} pxStreamBuffer_16->xTaskWaitingToSend;
  1237. if (_6 != 0B)
  1238. goto <bb 26>; [INV]
  1239. else
  1240. goto <bb 27>; [INV]
  1241. <bb 26> :
  1242. _7 ={v} pxStreamBuffer_16->xTaskWaitingToSend;
  1243. xTaskGenericNotify (_7, 0, 0, 0, 0B);
  1244. pxStreamBuffer_16->xTaskWaitingToSend ={v} 0B;
  1245. <bb 27> :
  1246. xTaskResumeAll ();
  1247. <bb 28> :
  1248. # xReceivedLength_8 = PHI <xReceivedLength_17(23), xReceivedLength_38(27), xReceivedLength_38(24)>
  1249. _43 = xReceivedLength_8;
  1250. <bb 29> :
  1251. <L29>:
  1252. return _43;
  1253. }
  1254. prvWriteMessageToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace)
  1255. {
  1256. size_t xNextHead;
  1257. size_t D.6447;
  1258. unsigned char _1;
  1259. int _2;
  1260. int _3;
  1261. unsigned int xDataLengthBytes.2_4;
  1262. unsigned int _5;
  1263. unsigned int xDataLengthBytes.3_6;
  1264. unsigned int xDataLengthBytes.4_7;
  1265. unsigned int _8;
  1266. size_t _24;
  1267. <bb 2> :
  1268. xNextHead_14 ={v} pxStreamBuffer_13(D)->xHead;
  1269. _1 = pxStreamBuffer_13(D)->ucFlags;
  1270. _2 = (int) _1;
  1271. _3 = _2 & 1;
  1272. if (_3 != 0)
  1273. goto <bb 3>; [INV]
  1274. else
  1275. goto <bb 6>; [INV]
  1276. <bb 3> :
  1277. if (xSpace_15(D) >= xRequiredSpace_17(D))
  1278. goto <bb 4>; [INV]
  1279. else
  1280. goto <bb 5>; [INV]
  1281. <bb 4> :
  1282. xNextHead_20 = prvWriteBytesToBuffer (pxStreamBuffer_13(D), &xDataLengthBytes, 4, xNextHead_14);
  1283. goto <bb 7>; [INV]
  1284. <bb 5> :
  1285. xDataLengthBytes = 0;
  1286. goto <bb 7>; [INV]
  1287. <bb 6> :
  1288. xDataLengthBytes.2_4 = xDataLengthBytes;
  1289. _5 = MIN_EXPR <xSpace_15(D), xDataLengthBytes.2_4>;
  1290. xDataLengthBytes = _5;
  1291. <bb 7> :
  1292. # xNextHead_9 = PHI <xNextHead_14(5), xNextHead_14(6), xNextHead_20(4)>
  1293. xDataLengthBytes.3_6 = xDataLengthBytes;
  1294. if (xDataLengthBytes.3_6 != 0)
  1295. goto <bb 8>; [INV]
  1296. else
  1297. goto <bb 9>; [INV]
  1298. <bb 8> :
  1299. xDataLengthBytes.4_7 = xDataLengthBytes;
  1300. _8 = prvWriteBytesToBuffer (pxStreamBuffer_13(D), pvTxData_21(D), xDataLengthBytes.4_7, xNextHead_9);
  1301. pxStreamBuffer_13(D)->xHead ={v} _8;
  1302. <bb 9> :
  1303. _24 = xDataLengthBytes;
  1304. <bb 10> :
  1305. <L8>:
  1306. return _24;
  1307. }
  1308. xStreamBufferSendFromISR (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  1309. {
  1310. uint32_t ulNewMaskValue;
  1311. uint32_t D.6650;
  1312. uint32_t ulOriginalBASEPRI;
  1313. uint32_t ulNewBASEPRI;
  1314. uint32_t D.6649;
  1315. uint32_t ulNewBASEPRI;
  1316. uint32_t ulNewBASEPRI;
  1317. UBaseType_t uxSavedInterruptStatus;
  1318. size_t xRequiredSpace;
  1319. size_t xSpace;
  1320. size_t xReturn;
  1321. struct StreamBuffer_t * const pxStreamBuffer;
  1322. size_t D.6435;
  1323. unsigned char _1;
  1324. int _2;
  1325. int _3;
  1326. unsigned int _4;
  1327. unsigned int _5;
  1328. struct tskTaskControlBlock * _6;
  1329. struct tskTaskControlBlock * _7;
  1330. size_t _27;
  1331. long unsigned int _32;
  1332. <bb 2> :
  1333. pxStreamBuffer_12 = xStreamBuffer_11(D);
  1334. xRequiredSpace_14 = xDataLengthBytes_13(D);
  1335. if (pvTxData_15(D) == 0B)
  1336. goto <bb 3>; [INV]
  1337. else
  1338. goto <bb 6>; [INV]
  1339. <bb 3> :
  1340. __asm__ __volatile__(" mov %0, %1
  1341. msr basepri, %0
  1342. isb
  1343. dsb
  1344. " : "=r" ulNewBASEPRI_28 : "i" 16 : "memory");
  1345. <bb 4> :
  1346. <bb 5> :
  1347. goto <bb 5>; [INV]
  1348. <bb 6> :
  1349. if (pxStreamBuffer_12 == 0B)
  1350. goto <bb 7>; [INV]
  1351. else
  1352. goto <bb 10>; [INV]
  1353. <bb 7> :
  1354. __asm__ __volatile__(" mov %0, %1
  1355. msr basepri, %0
  1356. isb
  1357. dsb
  1358. " : "=r" ulNewBASEPRI_29 : "i" 16 : "memory");
  1359. <bb 8> :
  1360. <bb 9> :
  1361. goto <bb 9>; [INV]
  1362. <bb 10> :
  1363. _1 = pxStreamBuffer_12->ucFlags;
  1364. _2 = (int) _1;
  1365. _3 = _2 & 1;
  1366. if (_3 != 0)
  1367. goto <bb 11>; [INV]
  1368. else
  1369. goto <bb 12>; [INV]
  1370. <bb 11> :
  1371. xRequiredSpace_17 = xRequiredSpace_14 + 4;
  1372. <bb 12> :
  1373. # xRequiredSpace_8 = PHI <xRequiredSpace_14(10), xRequiredSpace_17(11)>
  1374. xSpace_19 = xStreamBufferSpacesAvailable (pxStreamBuffer_12);
  1375. xReturn_21 = prvWriteMessageToBuffer (pxStreamBuffer_12, pvTxData_15(D), xDataLengthBytes_13(D), xSpace_19, xRequiredSpace_8);
  1376. if (xReturn_21 != 0)
  1377. goto <bb 13>; [INV]
  1378. else
  1379. goto <bb 20>; [INV]
  1380. <bb 13> :
  1381. _4 = prvBytesInBuffer (pxStreamBuffer_12);
  1382. _5 = pxStreamBuffer_12->xTriggerLevelBytes;
  1383. if (_4 >= _5)
  1384. goto <bb 14>; [INV]
  1385. else
  1386. goto <bb 20>; [INV]
  1387. <bb 14> :
  1388. __asm__ __volatile__(" mrs %0, basepri
  1389. mov %1, %2
  1390. msr basepri, %1
  1391. isb
  1392. dsb
  1393. " : "=r" ulOriginalBASEPRI_30, "=r" ulNewBASEPRI_31 : "i" 16 : "memory");
  1394. _32 = ulOriginalBASEPRI_30;
  1395. <bb 15> :
  1396. <L18>:
  1397. _35 = _32;
  1398. <bb 16> :
  1399. uxSavedInterruptStatus_23 = _35;
  1400. _6 ={v} pxStreamBuffer_12->xTaskWaitingToReceive;
  1401. if (_6 != 0B)
  1402. goto <bb 17>; [INV]
  1403. else
  1404. goto <bb 18>; [INV]
  1405. <bb 17> :
  1406. _7 ={v} pxStreamBuffer_12->xTaskWaitingToReceive;
  1407. xTaskGenericNotifyFromISR (_7, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_24(D));
  1408. pxStreamBuffer_12->xTaskWaitingToReceive ={v} 0B;
  1409. <bb 18> :
  1410. ulNewMaskValue_33 = uxSavedInterruptStatus_23;
  1411. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_33 : "memory");
  1412. <bb 19> :
  1413. <bb 20> :
  1414. _27 = xReturn_21;
  1415. <bb 21> :
  1416. <L17>:
  1417. return _27;
  1418. }
  1419. xStreamBufferSend (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait)
  1420. {
  1421. uint32_t ulNewBASEPRI;
  1422. uint32_t ulNewBASEPRI;
  1423. uint32_t ulNewBASEPRI;
  1424. uint32_t ulNewBASEPRI;
  1425. size_t xMaxReportedSpace;
  1426. struct TimeOut_t xTimeOut;
  1427. size_t xRequiredSpace;
  1428. size_t xSpace;
  1429. size_t xReturn;
  1430. struct StreamBuffer_t * const pxStreamBuffer;
  1431. size_t D.6417;
  1432. unsigned int _1;
  1433. unsigned char _2;
  1434. int _3;
  1435. int _4;
  1436. long unsigned int xTicksToWait.0_5;
  1437. struct tskTaskControlBlock * _6;
  1438. struct tskTaskControlBlock * _7;
  1439. long unsigned int xTicksToWait.1_8;
  1440. long int _9;
  1441. unsigned int _10;
  1442. unsigned int _11;
  1443. struct tskTaskControlBlock * _12;
  1444. struct tskTaskControlBlock * _13;
  1445. size_t _57;
  1446. <bb 2> :
  1447. pxStreamBuffer_25 = xStreamBuffer_24(D);
  1448. xSpace_26 = 0;
  1449. xRequiredSpace_28 = xDataLengthBytes_27(D);
  1450. xMaxReportedSpace_29 = 0;
  1451. if (pvTxData_30(D) == 0B)
  1452. goto <bb 3>; [INV]
  1453. else
  1454. goto <bb 6>; [INV]
  1455. <bb 3> :
  1456. __asm__ __volatile__(" mov %0, %1
  1457. msr basepri, %0
  1458. isb
  1459. dsb
  1460. " : "=r" ulNewBASEPRI_59 : "i" 16 : "memory");
  1461. <bb 4> :
  1462. <bb 5> :
  1463. goto <bb 5>; [INV]
  1464. <bb 6> :
  1465. if (pxStreamBuffer_25 == 0B)
  1466. goto <bb 7>; [INV]
  1467. else
  1468. goto <bb 10>; [INV]
  1469. <bb 7> :
  1470. __asm__ __volatile__(" mov %0, %1
  1471. msr basepri, %0
  1472. isb
  1473. dsb
  1474. " : "=r" ulNewBASEPRI_60 : "i" 16 : "memory");
  1475. <bb 8> :
  1476. <bb 9> :
  1477. goto <bb 9>; [INV]
  1478. <bb 10> :
  1479. _1 = pxStreamBuffer_25->xLength;
  1480. xMaxReportedSpace_32 = _1 + 4294967295;
  1481. _2 = pxStreamBuffer_25->ucFlags;
  1482. _3 = (int) _2;
  1483. _4 = _3 & 1;
  1484. if (_4 != 0)
  1485. goto <bb 11>; [INV]
  1486. else
  1487. goto <bb 17>; [INV]
  1488. <bb 11> :
  1489. xRequiredSpace_34 = xRequiredSpace_28 + 4;
  1490. if (xRequiredSpace_34 <= xDataLengthBytes_27(D))
  1491. goto <bb 12>; [INV]
  1492. else
  1493. goto <bb 15>; [INV]
  1494. <bb 12> :
  1495. __asm__ __volatile__(" mov %0, %1
  1496. msr basepri, %0
  1497. isb
  1498. dsb
  1499. " : "=r" ulNewBASEPRI_61 : "i" 16 : "memory");
  1500. <bb 13> :
  1501. <bb 14> :
  1502. goto <bb 14>; [INV]
  1503. <bb 15> :
  1504. if (xRequiredSpace_34 > xMaxReportedSpace_32)
  1505. goto <bb 16>; [INV]
  1506. else
  1507. goto <bb 19>; [INV]
  1508. <bb 16> :
  1509. xTicksToWait = 0;
  1510. goto <bb 19>; [INV]
  1511. <bb 17> :
  1512. if (xRequiredSpace_28 > xMaxReportedSpace_32)
  1513. goto <bb 18>; [INV]
  1514. else
  1515. goto <bb 19>; [INV]
  1516. <bb 18> :
  1517. xRequiredSpace_33 = xMaxReportedSpace_32;
  1518. <bb 19> :
  1519. # xRequiredSpace_16 = PHI <xRequiredSpace_34(16), xRequiredSpace_28(17), xRequiredSpace_33(18), xRequiredSpace_34(15)>
  1520. xTicksToWait.0_5 = xTicksToWait;
  1521. if (xTicksToWait.0_5 != 0)
  1522. goto <bb 20>; [INV]
  1523. else
  1524. goto <bb 30>; [INV]
  1525. <bb 20> :
  1526. vTaskSetTimeOutState (&xTimeOut);
  1527. <bb 21> :
  1528. vPortEnterCritical ();
  1529. xSpace_39 = xStreamBufferSpacesAvailable (pxStreamBuffer_25);
  1530. if (xSpace_39 < xRequiredSpace_16)
  1531. goto <bb 22>; [INV]
  1532. else
  1533. goto <bb 27>; [INV]
  1534. <bb 22> :
  1535. xTaskGenericNotifyStateClear (0B, 0);
  1536. _6 ={v} pxStreamBuffer_25->xTaskWaitingToSend;
  1537. if (_6 != 0B)
  1538. goto <bb 23>; [INV]
  1539. else
  1540. goto <bb 26>; [INV]
  1541. <bb 23> :
  1542. __asm__ __volatile__(" mov %0, %1
  1543. msr basepri, %0
  1544. isb
  1545. dsb
  1546. " : "=r" ulNewBASEPRI_62 : "i" 16 : "memory");
  1547. <bb 24> :
  1548. <bb 25> :
  1549. goto <bb 25>; [INV]
  1550. <bb 26> :
  1551. _7 = xTaskGetCurrentTaskHandle ();
  1552. pxStreamBuffer_25->xTaskWaitingToSend ={v} _7;
  1553. goto <bb 28>; [INV]
  1554. <bb 27> :
  1555. vPortExitCritical ();
  1556. goto <bb 29>; [INV]
  1557. <bb 28> :
  1558. vPortExitCritical ();
  1559. xTicksToWait.1_8 = xTicksToWait;
  1560. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait.1_8);
  1561. pxStreamBuffer_25->xTaskWaitingToSend ={v} 0B;
  1562. _9 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1563. if (_9 == 0)
  1564. goto <bb 21>; [INV]
  1565. else
  1566. goto <bb 29>; [INV]
  1567. <bb 29> :
  1568. <bb 30> :
  1569. # xSpace_14 = PHI <xSpace_26(19), xSpace_39(29)>
  1570. if (xSpace_14 == 0)
  1571. goto <bb 31>; [INV]
  1572. else
  1573. goto <bb 32>; [INV]
  1574. <bb 31> :
  1575. xSpace_49 = xStreamBufferSpacesAvailable (pxStreamBuffer_25);
  1576. <bb 32> :
  1577. # xSpace_15 = PHI <xSpace_14(30), xSpace_49(31)>
  1578. xReturn_51 = prvWriteMessageToBuffer (pxStreamBuffer_25, pvTxData_30(D), xDataLengthBytes_27(D), xSpace_15, xRequiredSpace_16);
  1579. if (xReturn_51 != 0)
  1580. goto <bb 33>; [INV]
  1581. else
  1582. goto <bb 37>; [INV]
  1583. <bb 33> :
  1584. _10 = prvBytesInBuffer (pxStreamBuffer_25);
  1585. _11 = pxStreamBuffer_25->xTriggerLevelBytes;
  1586. if (_10 >= _11)
  1587. goto <bb 34>; [INV]
  1588. else
  1589. goto <bb 37>; [INV]
  1590. <bb 34> :
  1591. vTaskSuspendAll ();
  1592. _12 ={v} pxStreamBuffer_25->xTaskWaitingToReceive;
  1593. if (_12 != 0B)
  1594. goto <bb 35>; [INV]
  1595. else
  1596. goto <bb 36>; [INV]
  1597. <bb 35> :
  1598. _13 ={v} pxStreamBuffer_25->xTaskWaitingToReceive;
  1599. xTaskGenericNotify (_13, 0, 0, 0, 0B);
  1600. pxStreamBuffer_25->xTaskWaitingToReceive ={v} 0B;
  1601. <bb 36> :
  1602. xTaskResumeAll ();
  1603. <bb 37> :
  1604. _57 = xReturn_51;
  1605. xTimeOut ={v} {CLOBBER};
  1606. <bb 38> :
  1607. <L41>:
  1608. return _57;
  1609. }
  1610. xStreamBufferBytesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1611. {
  1612. uint32_t ulNewBASEPRI;
  1613. size_t xReturn;
  1614. const struct StreamBuffer_t * const pxStreamBuffer;
  1615. size_t D.6381;
  1616. size_t _6;
  1617. <bb 2> :
  1618. pxStreamBuffer_2 = xStreamBuffer_1(D);
  1619. if (pxStreamBuffer_2 == 0B)
  1620. goto <bb 3>; [INV]
  1621. else
  1622. goto <bb 6>; [INV]
  1623. <bb 3> :
  1624. __asm__ __volatile__(" mov %0, %1
  1625. msr basepri, %0
  1626. isb
  1627. dsb
  1628. " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
  1629. <bb 4> :
  1630. <bb 5> :
  1631. goto <bb 5>; [INV]
  1632. <bb 6> :
  1633. xReturn_5 = prvBytesInBuffer (pxStreamBuffer_2);
  1634. _6 = xReturn_5;
  1635. <bb 7> :
  1636. <L3>:
  1637. return _6;
  1638. }
  1639. xStreamBufferSpacesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1640. {
  1641. uint32_t ulNewBASEPRI;
  1642. size_t xOriginalTail;
  1643. size_t xSpace;
  1644. const struct StreamBuffer_t * const pxStreamBuffer;
  1645. size_t D.6377;
  1646. unsigned int D.6373;
  1647. unsigned int _1;
  1648. unsigned int _2;
  1649. unsigned int _3;
  1650. unsigned int _4;
  1651. unsigned int _5;
  1652. unsigned int _12;
  1653. size_t _16;
  1654. <bb 2> :
  1655. pxStreamBuffer_8 = xStreamBuffer_7(D);
  1656. if (pxStreamBuffer_8 == 0B)
  1657. goto <bb 3>; [INV]
  1658. else
  1659. goto <bb 6>; [INV]
  1660. <bb 3> :
  1661. __asm__ __volatile__(" mov %0, %1
  1662. msr basepri, %0
  1663. isb
  1664. dsb
  1665. " : "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
  1666. <bb 4> :
  1667. <bb 5> :
  1668. goto <bb 5>; [INV]
  1669. <bb 6> :
  1670. xOriginalTail_10 ={v} pxStreamBuffer_8->xTail;
  1671. _1 = pxStreamBuffer_8->xLength;
  1672. _2 ={v} pxStreamBuffer_8->xTail;
  1673. xSpace_11 = _1 + _2;
  1674. _12 ={v} pxStreamBuffer_8->xHead;
  1675. xSpace_13 = xSpace_11 - _12;
  1676. _3 ={v} pxStreamBuffer_8->xTail;
  1677. if (xOriginalTail_10 != _3)
  1678. goto <bb 6>; [INV]
  1679. else
  1680. goto <bb 7>; [INV]
  1681. <bb 7> :
  1682. xSpace_14 = xSpace_13 + 4294967295;
  1683. _4 = pxStreamBuffer_8->xLength;
  1684. if (xSpace_14 >= _4)
  1685. goto <bb 8>; [INV]
  1686. else
  1687. goto <bb 9>; [INV]
  1688. <bb 8> :
  1689. _5 = pxStreamBuffer_8->xLength;
  1690. xSpace_15 = xSpace_14 - _5;
  1691. <bb 9> :
  1692. # xSpace_6 = PHI <xSpace_14(7), xSpace_15(8)>
  1693. _16 = xSpace_6;
  1694. <bb 10> :
  1695. <L8>:
  1696. return _16;
  1697. }
  1698. xStreamBufferSetTriggerLevel (struct StreamBufferDef_t * xStreamBuffer, size_t xTriggerLevel)
  1699. {
  1700. uint32_t ulNewBASEPRI;
  1701. BaseType_t xReturn;
  1702. struct StreamBuffer_t * const pxStreamBuffer;
  1703. BaseType_t D.6369;
  1704. unsigned int _1;
  1705. BaseType_t _13;
  1706. <bb 2> :
  1707. pxStreamBuffer_6 = xStreamBuffer_5(D);
  1708. if (pxStreamBuffer_6 == 0B)
  1709. goto <bb 3>; [INV]
  1710. else
  1711. goto <bb 6>; [INV]
  1712. <bb 3> :
  1713. __asm__ __volatile__(" mov %0, %1
  1714. msr basepri, %0
  1715. isb
  1716. dsb
  1717. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  1718. <bb 4> :
  1719. <bb 5> :
  1720. goto <bb 5>; [INV]
  1721. <bb 6> :
  1722. if (xTriggerLevel_7(D) == 0)
  1723. goto <bb 7>; [INV]
  1724. else
  1725. goto <bb 8>; [INV]
  1726. <bb 7> :
  1727. xTriggerLevel_8 = 1;
  1728. <bb 8> :
  1729. # xTriggerLevel_2 = PHI <xTriggerLevel_7(D)(6), xTriggerLevel_8(7)>
  1730. _1 = pxStreamBuffer_6->xLength;
  1731. if (xTriggerLevel_2 < _1)
  1732. goto <bb 9>; [INV]
  1733. else
  1734. goto <bb 10>; [INV]
  1735. <bb 9> :
  1736. pxStreamBuffer_6->xTriggerLevelBytes = xTriggerLevel_2;
  1737. xReturn_12 = 1;
  1738. goto <bb 11>; [INV]
  1739. <bb 10> :
  1740. xReturn_10 = 0;
  1741. <bb 11> :
  1742. # xReturn_3 = PHI <xReturn_12(9), xReturn_10(10)>
  1743. _13 = xReturn_3;
  1744. <bb 12> :
  1745. <L8>:
  1746. return _13;
  1747. }
  1748. xStreamBufferReset (struct StreamBufferDef_t * xStreamBuffer)
  1749. {
  1750. uint32_t ulNewBASEPRI;
  1751. UBaseType_t uxStreamBufferNumber;
  1752. BaseType_t xReturn;
  1753. struct StreamBuffer_t * const pxStreamBuffer;
  1754. BaseType_t D.6360;
  1755. struct tskTaskControlBlock * _1;
  1756. struct tskTaskControlBlock * _2;
  1757. uint8_t * _3;
  1758. unsigned int _4;
  1759. unsigned int _5;
  1760. unsigned char _6;
  1761. BaseType_t _19;
  1762. <bb 2> :
  1763. pxStreamBuffer_10 = xStreamBuffer_9(D);
  1764. xReturn_11 = 0;
  1765. if (pxStreamBuffer_10 == 0B)
  1766. goto <bb 3>; [INV]
  1767. else
  1768. goto <bb 6>; [INV]
  1769. <bb 3> :
  1770. __asm__ __volatile__(" mov %0, %1
  1771. msr basepri, %0
  1772. isb
  1773. dsb
  1774. " : "=r" ulNewBASEPRI_20 : "i" 16 : "memory");
  1775. <bb 4> :
  1776. <bb 5> :
  1777. goto <bb 5>; [INV]
  1778. <bb 6> :
  1779. uxStreamBufferNumber_13 = pxStreamBuffer_10->uxStreamBufferNumber;
  1780. vPortEnterCritical ();
  1781. _1 ={v} pxStreamBuffer_10->xTaskWaitingToReceive;
  1782. if (_1 == 0B)
  1783. goto <bb 7>; [INV]
  1784. else
  1785. goto <bb 9>; [INV]
  1786. <bb 7> :
  1787. _2 ={v} pxStreamBuffer_10->xTaskWaitingToSend;
  1788. if (_2 == 0B)
  1789. goto <bb 8>; [INV]
  1790. else
  1791. goto <bb 9>; [INV]
  1792. <bb 8> :
  1793. _3 = pxStreamBuffer_10->pucBuffer;
  1794. _4 = pxStreamBuffer_10->xLength;
  1795. _5 = pxStreamBuffer_10->xTriggerLevelBytes;
  1796. _6 = pxStreamBuffer_10->ucFlags;
  1797. prvInitialiseNewStreamBuffer (pxStreamBuffer_10, _3, _4, _5, _6);
  1798. xReturn_16 = 1;
  1799. pxStreamBuffer_10->uxStreamBufferNumber = uxStreamBufferNumber_13;
  1800. <bb 9> :
  1801. # xReturn_7 = PHI <xReturn_11(6), xReturn_11(7), xReturn_16(8)>
  1802. vPortExitCritical ();
  1803. _19 = xReturn_7;
  1804. <bb 10> :
  1805. <L7>:
  1806. return _19;
  1807. }
  1808. vStreamBufferDelete (struct StreamBufferDef_t * xStreamBuffer)
  1809. {
  1810. uint32_t ulNewBASEPRI;
  1811. struct StreamBuffer_t * pxStreamBuffer;
  1812. unsigned char _1;
  1813. int _2;
  1814. int _3;
  1815. <bb 2> :
  1816. pxStreamBuffer_6 = xStreamBuffer_5(D);
  1817. if (pxStreamBuffer_6 == 0B)
  1818. goto <bb 3>; [INV]
  1819. else
  1820. goto <bb 6>; [INV]
  1821. <bb 3> :
  1822. __asm__ __volatile__(" mov %0, %1
  1823. msr basepri, %0
  1824. isb
  1825. dsb
  1826. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  1827. <bb 4> :
  1828. <bb 5> :
  1829. goto <bb 5>; [INV]
  1830. <bb 6> :
  1831. _1 = pxStreamBuffer_6->ucFlags;
  1832. _2 = (int) _1;
  1833. _3 = _2 & 2;
  1834. if (_3 == 0)
  1835. goto <bb 7>; [INV]
  1836. else
  1837. goto <bb 8>; [INV]
  1838. <bb 7> :
  1839. vPortFree (pxStreamBuffer_6);
  1840. goto <bb 9>; [INV]
  1841. <bb 8> :
  1842. memset (pxStreamBuffer_6, 0, 36);
  1843. <bb 9> :
  1844. return;
  1845. }
  1846. xStreamBufferGenericCreate (size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer)
  1847. {
  1848. uint32_t ulNewBASEPRI;
  1849. uint32_t ulNewBASEPRI;
  1850. uint32_t ulNewBASEPRI;
  1851. uint8_t ucFlags;
  1852. uint8_t * pucAllocatedMemory;
  1853. struct StreamBufferDef_t * D.6347;
  1854. unsigned int _1;
  1855. uint8_t * _2;
  1856. struct StreamBufferDef_t * _21;
  1857. <bb 2> :
  1858. if (xIsMessageBuffer_9(D) == 1)
  1859. goto <bb 3>; [INV]
  1860. else
  1861. goto <bb 7>; [INV]
  1862. <bb 3> :
  1863. ucFlags_13 = 1;
  1864. if (xBufferSizeBytes_11(D) <= 4)
  1865. goto <bb 4>; [INV]
  1866. else
  1867. goto <bb 11>; [INV]
  1868. <bb 4> :
  1869. __asm__ __volatile__(" mov %0, %1
  1870. msr basepri, %0
  1871. isb
  1872. dsb
  1873. " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
  1874. <bb 5> :
  1875. <bb 6> :
  1876. goto <bb 6>; [INV]
  1877. <bb 7> :
  1878. ucFlags_10 = 0;
  1879. if (xBufferSizeBytes_11(D) == 0)
  1880. goto <bb 8>; [INV]
  1881. else
  1882. goto <bb 11>; [INV]
  1883. <bb 8> :
  1884. __asm__ __volatile__(" mov %0, %1
  1885. msr basepri, %0
  1886. isb
  1887. dsb
  1888. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  1889. <bb 9> :
  1890. <bb 10> :
  1891. goto <bb 10>; [INV]
  1892. <bb 11> :
  1893. # ucFlags_6 = PHI <ucFlags_13(3), ucFlags_10(7)>
  1894. if (xTriggerLevelBytes_14(D) > xBufferSizeBytes_11(D))
  1895. goto <bb 12>; [INV]
  1896. else
  1897. goto <bb 15>; [INV]
  1898. <bb 12> :
  1899. __asm__ __volatile__(" mov %0, %1
  1900. msr basepri, %0
  1901. isb
  1902. dsb
  1903. " : "=r" ulNewBASEPRI_24 : "i" 16 : "memory");
  1904. <bb 13> :
  1905. <bb 14> :
  1906. goto <bb 14>; [INV]
  1907. <bb 15> :
  1908. if (xTriggerLevelBytes_14(D) == 0)
  1909. goto <bb 16>; [INV]
  1910. else
  1911. goto <bb 17>; [INV]
  1912. <bb 16> :
  1913. xTriggerLevelBytes_15 = 1;
  1914. <bb 17> :
  1915. # xTriggerLevelBytes_4 = PHI <xTriggerLevelBytes_14(D)(15), xTriggerLevelBytes_15(16)>
  1916. if (xBufferSizeBytes_11(D) <= 4294967258)
  1917. goto <bb 18>; [INV]
  1918. else
  1919. goto <bb 19>; [INV]
  1920. <bb 18> :
  1921. xBufferSizeBytes_17 = xBufferSizeBytes_11(D) + 1;
  1922. _1 = xBufferSizeBytes_17 + 36;
  1923. pucAllocatedMemory_19 = pvPortMalloc (_1);
  1924. goto <bb 20>; [INV]
  1925. <bb 19> :
  1926. pucAllocatedMemory_16 = 0B;
  1927. <bb 20> :
  1928. # xBufferSizeBytes_3 = PHI <xBufferSizeBytes_17(18), xBufferSizeBytes_11(D)(19)>
  1929. # pucAllocatedMemory_5 = PHI <pucAllocatedMemory_19(18), pucAllocatedMemory_16(19)>
  1930. if (pucAllocatedMemory_5 != 0B)
  1931. goto <bb 21>; [INV]
  1932. else
  1933. goto <bb 22>; [INV]
  1934. <bb 21> :
  1935. _2 = pucAllocatedMemory_5 + 36;
  1936. prvInitialiseNewStreamBuffer (pucAllocatedMemory_5, _2, xBufferSizeBytes_3, xTriggerLevelBytes_4, ucFlags_6);
  1937. <bb 22> :
  1938. _21 = pucAllocatedMemory_5;
  1939. <bb 23> :
  1940. <L20>:
  1941. return _21;
  1942. }