stream_buffer.c.075i.fnsummary 52 KB

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