stream_buffer.c.016i.visibility 52 KB

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