stream_buffer.c.068i.whole-program 53 KB

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