queue.c.064i.free-fnsummary1 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637
  1. vQueueWaitForMessageRestricted (struct QueueDefinition * xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely)
  2. {
  3. struct Queue_t * const pxQueue;
  4. signed char _1;
  5. signed char _2;
  6. long unsigned int _3;
  7. struct List_t * _4;
  8. <bb 2> :
  9. pxQueue_9 = xQueue_8(D);
  10. vPortEnterCritical ();
  11. _1 ={v} pxQueue_9->cRxLock;
  12. if (_1 == -1)
  13. goto <bb 3>; [INV]
  14. else
  15. goto <bb 4>; [INV]
  16. <bb 3> :
  17. pxQueue_9->cRxLock ={v} 0;
  18. <bb 4> :
  19. _2 ={v} pxQueue_9->cTxLock;
  20. if (_2 == -1)
  21. goto <bb 5>; [INV]
  22. else
  23. goto <bb 6>; [INV]
  24. <bb 5> :
  25. pxQueue_9->cTxLock ={v} 0;
  26. <bb 6> :
  27. vPortExitCritical ();
  28. _3 ={v} pxQueue_9->uxMessagesWaiting;
  29. if (_3 == 0)
  30. goto <bb 7>; [INV]
  31. else
  32. goto <bb 8>; [INV]
  33. <bb 7> :
  34. _4 = &pxQueue_9->xTasksWaitingToReceive;
  35. vTaskPlaceOnEventListRestricted (_4, xTicksToWait_15(D), xWaitIndefinitely_16(D));
  36. <bb 8> :
  37. prvUnlockQueue (pxQueue_9);
  38. return;
  39. }
  40. vQueueUnregisterQueue (struct QueueDefinition * xQueue)
  41. {
  42. uint32_t ulNewBASEPRI;
  43. UBaseType_t ux;
  44. struct QueueDefinition * _1;
  45. <bb 2> :
  46. if (xQueue_4(D) == 0B)
  47. goto <bb 3>; [INV]
  48. else
  49. goto <bb 6>; [INV]
  50. <bb 3> :
  51. __asm__ __volatile__(" mov %0, %1
  52. msr basepri, %0
  53. isb
  54. dsb
  55. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  56. <bb 4> :
  57. <bb 5> :
  58. goto <bb 5>; [INV]
  59. <bb 6> :
  60. ux_5 = 0;
  61. goto <bb 10>; [INV]
  62. <bb 7> :
  63. _1 = xQueueRegistry[ux_2].xHandle;
  64. if (xQueue_4(D) == _1)
  65. goto <bb 8>; [INV]
  66. else
  67. goto <bb 9>; [INV]
  68. <bb 8> :
  69. xQueueRegistry[ux_2].pcQueueName = 0B;
  70. xQueueRegistry[ux_2].xHandle = 0B;
  71. goto <bb 11>; [INV]
  72. <bb 9> :
  73. ux_7 = ux_2 + 1;
  74. <bb 10> :
  75. # ux_2 = PHI <ux_5(6), ux_7(9)>
  76. if (ux_2 <= 1)
  77. goto <bb 7>; [INV]
  78. else
  79. goto <bb 11>; [INV]
  80. <bb 11> :
  81. return;
  82. }
  83. pcQueueGetName (struct QueueDefinition * xQueue)
  84. {
  85. uint32_t ulNewBASEPRI;
  86. const char * pcReturn;
  87. UBaseType_t ux;
  88. const char * D.7264;
  89. struct QueueDefinition * _1;
  90. const char * _10;
  91. <bb 2> :
  92. pcReturn_4 = 0B;
  93. if (xQueue_5(D) == 0B)
  94. goto <bb 3>; [INV]
  95. else
  96. goto <bb 6>; [INV]
  97. <bb 3> :
  98. __asm__ __volatile__(" mov %0, %1
  99. msr basepri, %0
  100. isb
  101. dsb
  102. " : "=r" ulNewBASEPRI_11 : "i" 16 : "memory");
  103. <bb 4> :
  104. <bb 5> :
  105. goto <bb 5>; [INV]
  106. <bb 6> :
  107. ux_6 = 0;
  108. goto <bb 10>; [INV]
  109. <bb 7> :
  110. _1 = xQueueRegistry[ux_2].xHandle;
  111. if (xQueue_5(D) == _1)
  112. goto <bb 8>; [INV]
  113. else
  114. goto <bb 9>; [INV]
  115. <bb 8> :
  116. pcReturn_9 = xQueueRegistry[ux_2].pcQueueName;
  117. goto <bb 11>; [INV]
  118. <bb 9> :
  119. ux_8 = ux_2 + 1;
  120. <bb 10> :
  121. # ux_2 = PHI <ux_6(6), ux_8(9)>
  122. if (ux_2 <= 1)
  123. goto <bb 7>; [INV]
  124. else
  125. goto <bb 11>; [INV]
  126. <bb 11> :
  127. # pcReturn_3 = PHI <pcReturn_9(8), pcReturn_4(10)>
  128. _10 = pcReturn_3;
  129. <bb 12> :
  130. <L8>:
  131. return _10;
  132. }
  133. vQueueAddToRegistry (struct QueueDefinition * xQueue, const char * pcQueueName)
  134. {
  135. uint32_t ulNewBASEPRI;
  136. struct QueueRegistryItem_t * pxEntryToWrite;
  137. UBaseType_t ux;
  138. struct QueueDefinition * _1;
  139. const char * _2;
  140. <bb 2> :
  141. if (xQueue_8(D) == 0B)
  142. goto <bb 3>; [INV]
  143. else
  144. goto <bb 6>; [INV]
  145. <bb 3> :
  146. __asm__ __volatile__(" mov %0, %1
  147. msr basepri, %0
  148. isb
  149. dsb
  150. " : "=r" ulNewBASEPRI_18 : "i" 16 : "memory");
  151. <bb 4> :
  152. <bb 5> :
  153. goto <bb 5>; [INV]
  154. <bb 6> :
  155. pxEntryToWrite_9 = 0B;
  156. if (pcQueueName_10(D) != 0B)
  157. goto <bb 7>; [INV]
  158. else
  159. goto <bb 15>; [INV]
  160. <bb 7> :
  161. ux_11 = 0;
  162. goto <bb 14>; [INV]
  163. <bb 8> :
  164. _1 = xQueueRegistry[ux_3].xHandle;
  165. if (xQueue_8(D) == _1)
  166. goto <bb 9>; [INV]
  167. else
  168. goto <bb 10>; [INV]
  169. <bb 9> :
  170. pxEntryToWrite_15 = &xQueueRegistry[ux_3];
  171. goto <bb 15>; [INV]
  172. <bb 10> :
  173. if (pxEntryToWrite_5 == 0B)
  174. goto <bb 11>; [INV]
  175. else
  176. goto <bb 13>; [INV]
  177. <bb 11> :
  178. _2 = xQueueRegistry[ux_3].pcQueueName;
  179. if (_2 == 0B)
  180. goto <bb 12>; [INV]
  181. else
  182. goto <bb 13>; [INV]
  183. <bb 12> :
  184. pxEntryToWrite_13 = &xQueueRegistry[ux_3];
  185. <bb 13> :
  186. # pxEntryToWrite_4 = PHI <pxEntryToWrite_5(10), pxEntryToWrite_5(11), pxEntryToWrite_13(12)>
  187. ux_14 = ux_3 + 1;
  188. <bb 14> :
  189. # ux_3 = PHI <ux_11(7), ux_14(13)>
  190. # pxEntryToWrite_5 = PHI <pxEntryToWrite_9(7), pxEntryToWrite_4(13)>
  191. if (ux_3 <= 1)
  192. goto <bb 8>; [INV]
  193. else
  194. goto <bb 15>; [INV]
  195. <bb 15> :
  196. # pxEntryToWrite_6 = PHI <pxEntryToWrite_9(6), pxEntryToWrite_15(9), pxEntryToWrite_5(14)>
  197. if (pxEntryToWrite_6 != 0B)
  198. goto <bb 16>; [INV]
  199. else
  200. goto <bb 17>; [INV]
  201. <bb 16> :
  202. pxEntryToWrite_6->pcQueueName = pcQueueName_10(D);
  203. pxEntryToWrite_6->xHandle = xQueue_8(D);
  204. <bb 17> :
  205. return;
  206. }
  207. xQueueIsQueueFullFromISR (struct QueueDefinition * const xQueue)
  208. {
  209. uint32_t ulNewBASEPRI;
  210. struct Queue_t * const pxQueue;
  211. BaseType_t xReturn;
  212. BaseType_t D.7245;
  213. long unsigned int _1;
  214. long unsigned int _2;
  215. BaseType_t _9;
  216. <bb 2> :
  217. pxQueue_5 = xQueue_4(D);
  218. if (pxQueue_5 == 0B)
  219. goto <bb 3>; [INV]
  220. else
  221. goto <bb 6>; [INV]
  222. <bb 3> :
  223. __asm__ __volatile__(" mov %0, %1
  224. msr basepri, %0
  225. isb
  226. dsb
  227. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  228. <bb 4> :
  229. <bb 5> :
  230. goto <bb 5>; [INV]
  231. <bb 6> :
  232. _1 ={v} pxQueue_5->uxMessagesWaiting;
  233. _2 = pxQueue_5->uxLength;
  234. if (_1 == _2)
  235. goto <bb 7>; [INV]
  236. else
  237. goto <bb 8>; [INV]
  238. <bb 7> :
  239. xReturn_8 = 1;
  240. goto <bb 9>; [INV]
  241. <bb 8> :
  242. xReturn_7 = 0;
  243. <bb 9> :
  244. # xReturn_3 = PHI <xReturn_8(7), xReturn_7(8)>
  245. _9 = xReturn_3;
  246. <bb 10> :
  247. <L6>:
  248. return _9;
  249. }
  250. prvIsQueueFull (const struct Queue_t * pxQueue)
  251. {
  252. BaseType_t xReturn;
  253. BaseType_t D.7238;
  254. long unsigned int _1;
  255. long unsigned int _2;
  256. BaseType_t _10;
  257. <bb 2> :
  258. vPortEnterCritical ();
  259. _1 ={v} pxQueue_6(D)->uxMessagesWaiting;
  260. _2 = pxQueue_6(D)->uxLength;
  261. if (_1 == _2)
  262. goto <bb 3>; [INV]
  263. else
  264. goto <bb 4>; [INV]
  265. <bb 3> :
  266. xReturn_8 = 1;
  267. goto <bb 5>; [INV]
  268. <bb 4> :
  269. xReturn_7 = 0;
  270. <bb 5> :
  271. # xReturn_3 = PHI <xReturn_8(3), xReturn_7(4)>
  272. vPortExitCritical ();
  273. _10 = xReturn_3;
  274. <bb 6> :
  275. <L3>:
  276. return _10;
  277. }
  278. xQueueIsQueueEmptyFromISR (struct QueueDefinition * const xQueue)
  279. {
  280. uint32_t ulNewBASEPRI;
  281. struct Queue_t * const pxQueue;
  282. BaseType_t xReturn;
  283. BaseType_t D.7233;
  284. long unsigned int _1;
  285. BaseType_t _8;
  286. <bb 2> :
  287. pxQueue_4 = xQueue_3(D);
  288. if (pxQueue_4 == 0B)
  289. goto <bb 3>; [INV]
  290. else
  291. goto <bb 6>; [INV]
  292. <bb 3> :
  293. __asm__ __volatile__(" mov %0, %1
  294. msr basepri, %0
  295. isb
  296. dsb
  297. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  298. <bb 4> :
  299. <bb 5> :
  300. goto <bb 5>; [INV]
  301. <bb 6> :
  302. _1 ={v} pxQueue_4->uxMessagesWaiting;
  303. if (_1 == 0)
  304. goto <bb 7>; [INV]
  305. else
  306. goto <bb 8>; [INV]
  307. <bb 7> :
  308. xReturn_7 = 1;
  309. goto <bb 9>; [INV]
  310. <bb 8> :
  311. xReturn_6 = 0;
  312. <bb 9> :
  313. # xReturn_2 = PHI <xReturn_7(7), xReturn_6(8)>
  314. _8 = xReturn_2;
  315. <bb 10> :
  316. <L6>:
  317. return _8;
  318. }
  319. prvIsQueueEmpty (const struct Queue_t * pxQueue)
  320. {
  321. BaseType_t xReturn;
  322. BaseType_t D.7226;
  323. long unsigned int _1;
  324. BaseType_t _9;
  325. <bb 2> :
  326. vPortEnterCritical ();
  327. _1 ={v} pxQueue_5(D)->uxMessagesWaiting;
  328. if (_1 == 0)
  329. goto <bb 3>; [INV]
  330. else
  331. goto <bb 4>; [INV]
  332. <bb 3> :
  333. xReturn_7 = 1;
  334. goto <bb 5>; [INV]
  335. <bb 4> :
  336. xReturn_6 = 0;
  337. <bb 5> :
  338. # xReturn_2 = PHI <xReturn_7(3), xReturn_6(4)>
  339. vPortExitCritical ();
  340. _9 = xReturn_2;
  341. <bb 6> :
  342. <L3>:
  343. return _9;
  344. }
  345. prvUnlockQueue (struct Queue_t * const pxQueue)
  346. {
  347. int8_t cRxLock;
  348. int8_t cTxLock;
  349. long unsigned int _1;
  350. struct List_t * _2;
  351. long int _3;
  352. unsigned char cTxLock.28_4;
  353. unsigned char _5;
  354. long unsigned int _6;
  355. struct List_t * _7;
  356. long int _8;
  357. unsigned char cRxLock.29_9;
  358. unsigned char _10;
  359. <bb 2> :
  360. vPortEnterCritical ();
  361. cTxLock_20 ={v} pxQueue_19(D)->cTxLock;
  362. goto <bb 8>; [INV]
  363. <bb 3> :
  364. _1 ={v} pxQueue_19(D)->xTasksWaitingToReceive.uxNumberOfItems;
  365. if (_1 != 0)
  366. goto <bb 4>; [INV]
  367. else
  368. goto <bb 6>; [INV]
  369. <bb 4> :
  370. _2 = &pxQueue_19(D)->xTasksWaitingToReceive;
  371. _3 = xTaskRemoveFromEventList (_2);
  372. if (_3 != 0)
  373. goto <bb 5>; [INV]
  374. else
  375. goto <bb 7>; [INV]
  376. <bb 5> :
  377. vTaskMissedYield ();
  378. goto <bb 7>; [INV]
  379. <bb 6> :
  380. goto <bb 9>; [INV]
  381. <bb 7> :
  382. cTxLock.28_4 = (unsigned char) cTxLock_11;
  383. _5 = cTxLock.28_4 + 255;
  384. cTxLock_23 = (int8_t) _5;
  385. <bb 8> :
  386. # cTxLock_11 = PHI <cTxLock_20(2), cTxLock_23(7)>
  387. if (cTxLock_11 > 0)
  388. goto <bb 3>; [INV]
  389. else
  390. goto <bb 9>; [INV]
  391. <bb 9> :
  392. pxQueue_19(D)->cTxLock ={v} -1;
  393. vPortExitCritical ();
  394. vPortEnterCritical ();
  395. cRxLock_27 ={v} pxQueue_19(D)->cRxLock;
  396. goto <bb 15>; [INV]
  397. <bb 10> :
  398. _6 ={v} pxQueue_19(D)->xTasksWaitingToSend.uxNumberOfItems;
  399. if (_6 != 0)
  400. goto <bb 11>; [INV]
  401. else
  402. goto <bb 14>; [INV]
  403. <bb 11> :
  404. _7 = &pxQueue_19(D)->xTasksWaitingToSend;
  405. _8 = xTaskRemoveFromEventList (_7);
  406. if (_8 != 0)
  407. goto <bb 12>; [INV]
  408. else
  409. goto <bb 13>; [INV]
  410. <bb 12> :
  411. vTaskMissedYield ();
  412. <bb 13> :
  413. cRxLock.29_9 = (unsigned char) cRxLock_12;
  414. _10 = cRxLock.29_9 + 255;
  415. cRxLock_30 = (int8_t) _10;
  416. goto <bb 15>; [INV]
  417. <bb 14> :
  418. goto <bb 16>; [INV]
  419. <bb 15> :
  420. # cRxLock_12 = PHI <cRxLock_27(9), cRxLock_30(13)>
  421. if (cRxLock_12 > 0)
  422. goto <bb 10>; [INV]
  423. else
  424. goto <bb 16>; [INV]
  425. <bb 16> :
  426. pxQueue_19(D)->cRxLock ={v} -1;
  427. vPortExitCritical ();
  428. return;
  429. }
  430. prvCopyDataFromQueue (struct Queue_t * const pxQueue, void * const pvBuffer)
  431. {
  432. long unsigned int _1;
  433. int8_t * _2;
  434. long unsigned int _3;
  435. int8_t * _4;
  436. int8_t * _5;
  437. int8_t * _6;
  438. int8_t * _7;
  439. int8_t * _8;
  440. long unsigned int _9;
  441. <bb 2> :
  442. _1 = pxQueue_13(D)->uxItemSize;
  443. if (_1 != 0)
  444. goto <bb 3>; [INV]
  445. else
  446. goto <bb 6>; [INV]
  447. <bb 3> :
  448. _2 = pxQueue_13(D)->u.xQueue.pcReadFrom;
  449. _3 = pxQueue_13(D)->uxItemSize;
  450. _4 = _2 + _3;
  451. pxQueue_13(D)->u.xQueue.pcReadFrom = _4;
  452. _5 = pxQueue_13(D)->u.xQueue.pcReadFrom;
  453. _6 = pxQueue_13(D)->u.xQueue.pcTail;
  454. if (_5 >= _6)
  455. goto <bb 4>; [INV]
  456. else
  457. goto <bb 5>; [INV]
  458. <bb 4> :
  459. _7 = pxQueue_13(D)->pcHead;
  460. pxQueue_13(D)->u.xQueue.pcReadFrom = _7;
  461. <bb 5> :
  462. _8 = pxQueue_13(D)->u.xQueue.pcReadFrom;
  463. _9 = pxQueue_13(D)->uxItemSize;
  464. memcpy (pvBuffer_16(D), _8, _9);
  465. <bb 6> :
  466. return;
  467. }
  468. prvCopyDataToQueue (struct Queue_t * const pxQueue, const void * pvItemToQueue, const BaseType_t xPosition)
  469. {
  470. UBaseType_t uxMessagesWaiting;
  471. BaseType_t xReturn;
  472. BaseType_t D.7204;
  473. long unsigned int _1;
  474. int8_t * _2;
  475. struct tskTaskControlBlock * _3;
  476. int8_t * _4;
  477. long unsigned int _5;
  478. int8_t * _6;
  479. long unsigned int _7;
  480. int8_t * _8;
  481. int8_t * _9;
  482. int8_t * _10;
  483. int8_t * _11;
  484. int8_t * _12;
  485. long unsigned int _13;
  486. int8_t * _14;
  487. long unsigned int _15;
  488. sizetype _16;
  489. int8_t * _17;
  490. int8_t * _18;
  491. int8_t * _19;
  492. int8_t * _20;
  493. long unsigned int _21;
  494. sizetype _22;
  495. int8_t * _23;
  496. long unsigned int _24;
  497. BaseType_t _46;
  498. <bb 2> :
  499. xReturn_29 = 0;
  500. uxMessagesWaiting_32 ={v} pxQueue_31(D)->uxMessagesWaiting;
  501. _1 = pxQueue_31(D)->uxItemSize;
  502. if (_1 == 0)
  503. goto <bb 3>; [INV]
  504. else
  505. goto <bb 5>; [INV]
  506. <bb 3> :
  507. _2 = pxQueue_31(D)->pcHead;
  508. if (_2 == 0B)
  509. goto <bb 4>; [INV]
  510. else
  511. goto <bb 13>; [INV]
  512. <bb 4> :
  513. _3 = pxQueue_31(D)->u.xSemaphore.xMutexHolder;
  514. xReturn_43 = xTaskPriorityDisinherit (_3);
  515. pxQueue_31(D)->u.xSemaphore.xMutexHolder = 0B;
  516. goto <bb 13>; [INV]
  517. <bb 5> :
  518. if (xPosition_33(D) == 0)
  519. goto <bb 6>; [INV]
  520. else
  521. goto <bb 8>; [INV]
  522. <bb 6> :
  523. _4 = pxQueue_31(D)->pcWriteTo;
  524. _5 = pxQueue_31(D)->uxItemSize;
  525. memcpy (_4, pvItemToQueue_34(D), _5);
  526. _6 = pxQueue_31(D)->pcWriteTo;
  527. _7 = pxQueue_31(D)->uxItemSize;
  528. _8 = _6 + _7;
  529. pxQueue_31(D)->pcWriteTo = _8;
  530. _9 = pxQueue_31(D)->pcWriteTo;
  531. _10 = pxQueue_31(D)->u.xQueue.pcTail;
  532. if (_9 >= _10)
  533. goto <bb 7>; [INV]
  534. else
  535. goto <bb 13>; [INV]
  536. <bb 7> :
  537. _11 = pxQueue_31(D)->pcHead;
  538. pxQueue_31(D)->pcWriteTo = _11;
  539. goto <bb 13>; [INV]
  540. <bb 8> :
  541. _12 = pxQueue_31(D)->u.xQueue.pcReadFrom;
  542. _13 = pxQueue_31(D)->uxItemSize;
  543. memcpy (_12, pvItemToQueue_34(D), _13);
  544. _14 = pxQueue_31(D)->u.xQueue.pcReadFrom;
  545. _15 = pxQueue_31(D)->uxItemSize;
  546. _16 = -_15;
  547. _17 = _14 + _16;
  548. pxQueue_31(D)->u.xQueue.pcReadFrom = _17;
  549. _18 = pxQueue_31(D)->u.xQueue.pcReadFrom;
  550. _19 = pxQueue_31(D)->pcHead;
  551. if (_18 < _19)
  552. goto <bb 9>; [INV]
  553. else
  554. goto <bb 10>; [INV]
  555. <bb 9> :
  556. _20 = pxQueue_31(D)->u.xQueue.pcTail;
  557. _21 = pxQueue_31(D)->uxItemSize;
  558. _22 = -_21;
  559. _23 = _20 + _22;
  560. pxQueue_31(D)->u.xQueue.pcReadFrom = _23;
  561. <bb 10> :
  562. if (xPosition_33(D) == 2)
  563. goto <bb 11>; [INV]
  564. else
  565. goto <bb 13>; [INV]
  566. <bb 11> :
  567. if (uxMessagesWaiting_32 != 0)
  568. goto <bb 12>; [INV]
  569. else
  570. goto <bb 13>; [INV]
  571. <bb 12> :
  572. uxMessagesWaiting_38 = uxMessagesWaiting_32 + 4294967295;
  573. <bb 13> :
  574. # xReturn_25 = PHI <xReturn_43(4), xReturn_29(7), xReturn_29(10), xReturn_29(12), xReturn_29(3), xReturn_29(6), xReturn_29(11)>
  575. # uxMessagesWaiting_26 = PHI <uxMessagesWaiting_32(4), uxMessagesWaiting_32(7), uxMessagesWaiting_32(10), uxMessagesWaiting_38(12), uxMessagesWaiting_32(3), uxMessagesWaiting_32(6), uxMessagesWaiting_32(11)>
  576. _24 = uxMessagesWaiting_26 + 1;
  577. pxQueue_31(D)->uxMessagesWaiting ={v} _24;
  578. _46 = xReturn_25;
  579. <bb 14> :
  580. <L21>:
  581. return _46;
  582. }
  583. prvGetDisinheritPriorityAfterTimeout (const struct Queue_t * const pxQueue)
  584. {
  585. UBaseType_t uxHighestPriorityOfWaitingTasks;
  586. UBaseType_t D.7181;
  587. long unsigned int _1;
  588. struct xLIST_ITEM * _2;
  589. long unsigned int _3;
  590. UBaseType_t _9;
  591. <bb 2> :
  592. _1 ={v} pxQueue_6(D)->xTasksWaitingToReceive.uxNumberOfItems;
  593. if (_1 != 0)
  594. goto <bb 3>; [INV]
  595. else
  596. goto <bb 4>; [INV]
  597. <bb 3> :
  598. _2 = pxQueue_6(D)->xTasksWaitingToReceive.xListEnd.pxNext;
  599. _3 = _2->xItemValue;
  600. uxHighestPriorityOfWaitingTasks_8 = 5 - _3;
  601. goto <bb 5>; [INV]
  602. <bb 4> :
  603. uxHighestPriorityOfWaitingTasks_7 = 0;
  604. <bb 5> :
  605. # uxHighestPriorityOfWaitingTasks_4 = PHI <uxHighestPriorityOfWaitingTasks_8(3), uxHighestPriorityOfWaitingTasks_7(4)>
  606. _9 = uxHighestPriorityOfWaitingTasks_4;
  607. <bb 6> :
  608. <L3>:
  609. return _9;
  610. }
  611. ucQueueGetQueueType (struct QueueDefinition * xQueue)
  612. {
  613. uint8_t D.7176;
  614. uint8_t _3;
  615. <bb 2> :
  616. _3 = MEM[(struct Queue_t *)xQueue_2(D)].ucQueueType;
  617. <bb 3> :
  618. <L0>:
  619. return _3;
  620. }
  621. vQueueSetQueueNumber (struct QueueDefinition * xQueue, UBaseType_t uxQueueNumber)
  622. {
  623. <bb 2> :
  624. MEM[(struct Queue_t *)xQueue_2(D)].uxQueueNumber = uxQueueNumber_3(D);
  625. return;
  626. }
  627. uxQueueGetQueueNumber (struct QueueDefinition * xQueue)
  628. {
  629. UBaseType_t D.7174;
  630. UBaseType_t _3;
  631. <bb 2> :
  632. _3 = MEM[(struct Queue_t *)xQueue_2(D)].uxQueueNumber;
  633. <bb 3> :
  634. <L0>:
  635. return _3;
  636. }
  637. vQueueDelete (struct QueueDefinition * xQueue)
  638. {
  639. uint32_t ulNewBASEPRI;
  640. struct Queue_t * const pxQueue;
  641. <bb 2> :
  642. pxQueue_2 = xQueue_1(D);
  643. if (pxQueue_2 == 0B)
  644. goto <bb 3>; [INV]
  645. else
  646. goto <bb 6>; [INV]
  647. <bb 3> :
  648. __asm__ __volatile__(" mov %0, %1
  649. msr basepri, %0
  650. isb
  651. dsb
  652. " : "=r" ulNewBASEPRI_6 : "i" 16 : "memory");
  653. <bb 4> :
  654. <bb 5> :
  655. goto <bb 5>; [INV]
  656. <bb 6> :
  657. vQueueUnregisterQueue (pxQueue_2);
  658. vPortFree (pxQueue_2);
  659. return;
  660. }
  661. uxQueueMessagesWaitingFromISR (struct QueueDefinition * const xQueue)
  662. {
  663. uint32_t ulNewBASEPRI;
  664. struct Queue_t * const pxQueue;
  665. UBaseType_t uxReturn;
  666. UBaseType_t D.7170;
  667. UBaseType_t _5;
  668. <bb 2> :
  669. pxQueue_2 = xQueue_1(D);
  670. if (pxQueue_2 == 0B)
  671. goto <bb 3>; [INV]
  672. else
  673. goto <bb 6>; [INV]
  674. <bb 3> :
  675. __asm__ __volatile__(" mov %0, %1
  676. msr basepri, %0
  677. isb
  678. dsb
  679. " : "=r" ulNewBASEPRI_6 : "i" 16 : "memory");
  680. <bb 4> :
  681. <bb 5> :
  682. goto <bb 5>; [INV]
  683. <bb 6> :
  684. uxReturn_4 ={v} pxQueue_2->uxMessagesWaiting;
  685. _5 = uxReturn_4;
  686. <bb 7> :
  687. <L3>:
  688. return _5;
  689. }
  690. uxQueueSpacesAvailable (struct QueueDefinition * const xQueue)
  691. {
  692. uint32_t ulNewBASEPRI;
  693. struct Queue_t * const pxQueue;
  694. UBaseType_t uxReturn;
  695. UBaseType_t D.7166;
  696. long unsigned int _1;
  697. long unsigned int _2;
  698. UBaseType_t _9;
  699. <bb 2> :
  700. pxQueue_4 = xQueue_3(D);
  701. if (pxQueue_4 == 0B)
  702. goto <bb 3>; [INV]
  703. else
  704. goto <bb 6>; [INV]
  705. <bb 3> :
  706. __asm__ __volatile__(" mov %0, %1
  707. msr basepri, %0
  708. isb
  709. dsb
  710. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  711. <bb 4> :
  712. <bb 5> :
  713. goto <bb 5>; [INV]
  714. <bb 6> :
  715. vPortEnterCritical ();
  716. _1 = pxQueue_4->uxLength;
  717. _2 ={v} pxQueue_4->uxMessagesWaiting;
  718. uxReturn_7 = _1 - _2;
  719. vPortExitCritical ();
  720. _9 = uxReturn_7;
  721. <bb 7> :
  722. <L3>:
  723. return _9;
  724. }
  725. uxQueueMessagesWaiting (struct QueueDefinition * const xQueue)
  726. {
  727. uint32_t ulNewBASEPRI;
  728. UBaseType_t uxReturn;
  729. UBaseType_t D.7162;
  730. UBaseType_t _6;
  731. <bb 2> :
  732. if (xQueue_1(D) == 0B)
  733. goto <bb 3>; [INV]
  734. else
  735. goto <bb 6>; [INV]
  736. <bb 3> :
  737. __asm__ __volatile__(" mov %0, %1
  738. msr basepri, %0
  739. isb
  740. dsb
  741. " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
  742. <bb 4> :
  743. <bb 5> :
  744. goto <bb 5>; [INV]
  745. <bb 6> :
  746. vPortEnterCritical ();
  747. uxReturn_4 ={v} MEM[(struct Queue_t *)xQueue_1(D)].uxMessagesWaiting;
  748. vPortExitCritical ();
  749. _6 = uxReturn_4;
  750. <bb 7> :
  751. <L3>:
  752. return _6;
  753. }
  754. xQueuePeekFromISR (struct QueueDefinition * xQueue, void * const pvBuffer)
  755. {
  756. uint32_t ulNewMaskValue;
  757. uint32_t D.7361;
  758. uint32_t ulOriginalBASEPRI;
  759. uint32_t ulNewBASEPRI;
  760. uint32_t D.7360;
  761. uint32_t ulNewBASEPRI;
  762. uint32_t ulNewBASEPRI;
  763. uint32_t ulNewBASEPRI;
  764. struct Queue_t * const pxQueue;
  765. int8_t * pcOriginalReadPosition;
  766. UBaseType_t uxSavedInterruptStatus;
  767. BaseType_t xReturn;
  768. BaseType_t D.7158;
  769. int iftmp.27;
  770. long unsigned int _1;
  771. long unsigned int _2;
  772. long unsigned int _3;
  773. int iftmp.27_5;
  774. int iftmp.27_11;
  775. int iftmp.27_12;
  776. BaseType_t _20;
  777. long unsigned int _26;
  778. <bb 2> :
  779. pxQueue_8 = xQueue_7(D);
  780. if (pxQueue_8 == 0B)
  781. goto <bb 3>; [INV]
  782. else
  783. goto <bb 6>; [INV]
  784. <bb 3> :
  785. __asm__ __volatile__(" mov %0, %1
  786. msr basepri, %0
  787. isb
  788. dsb
  789. " : "=r" ulNewBASEPRI_21 : "i" 16 : "memory");
  790. <bb 4> :
  791. <bb 5> :
  792. goto <bb 5>; [INV]
  793. <bb 6> :
  794. if (pvBuffer_9(D) != 0B)
  795. goto <bb 8>; [INV]
  796. else
  797. goto <bb 7>; [INV]
  798. <bb 7> :
  799. _1 = pxQueue_8->uxItemSize;
  800. if (_1 == 0)
  801. goto <bb 8>; [INV]
  802. else
  803. goto <bb 9>; [INV]
  804. <bb 8> :
  805. iftmp.27_12 = 1;
  806. goto <bb 10>; [INV]
  807. <bb 9> :
  808. iftmp.27_11 = 0;
  809. <bb 10> :
  810. # iftmp.27_5 = PHI <iftmp.27_12(8), iftmp.27_11(9)>
  811. if (iftmp.27_5 == 0)
  812. goto <bb 11>; [INV]
  813. else
  814. goto <bb 14>; [INV]
  815. <bb 11> :
  816. __asm__ __volatile__(" mov %0, %1
  817. msr basepri, %0
  818. isb
  819. dsb
  820. " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
  821. <bb 12> :
  822. <bb 13> :
  823. goto <bb 13>; [INV]
  824. <bb 14> :
  825. _2 = pxQueue_8->uxItemSize;
  826. if (_2 == 0)
  827. goto <bb 15>; [INV]
  828. else
  829. goto <bb 18>; [INV]
  830. <bb 15> :
  831. __asm__ __volatile__(" mov %0, %1
  832. msr basepri, %0
  833. isb
  834. dsb
  835. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  836. <bb 16> :
  837. <bb 17> :
  838. goto <bb 17>; [INV]
  839. <bb 18> :
  840. vPortValidateInterruptPriority ();
  841. __asm__ __volatile__(" mrs %0, basepri
  842. mov %1, %2
  843. msr basepri, %1
  844. isb
  845. dsb
  846. " : "=r" ulOriginalBASEPRI_24, "=r" ulNewBASEPRI_25 : "i" 16 : "memory");
  847. _26 = ulOriginalBASEPRI_24;
  848. <bb 19> :
  849. <L17>:
  850. _29 = _26;
  851. <bb 20> :
  852. uxSavedInterruptStatus_14 = _29;
  853. _3 ={v} pxQueue_8->uxMessagesWaiting;
  854. if (_3 != 0)
  855. goto <bb 21>; [INV]
  856. else
  857. goto <bb 22>; [INV]
  858. <bb 21> :
  859. pcOriginalReadPosition_16 = pxQueue_8->u.xQueue.pcReadFrom;
  860. prvCopyDataFromQueue (pxQueue_8, pvBuffer_9(D));
  861. pxQueue_8->u.xQueue.pcReadFrom = pcOriginalReadPosition_16;
  862. xReturn_19 = 1;
  863. goto <bb 23>; [INV]
  864. <bb 22> :
  865. xReturn_15 = 0;
  866. <bb 23> :
  867. # xReturn_4 = PHI <xReturn_19(21), xReturn_15(22)>
  868. ulNewMaskValue_27 = uxSavedInterruptStatus_14;
  869. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_27 : "memory");
  870. <bb 24> :
  871. _20 = xReturn_4;
  872. <bb 25> :
  873. <L16>:
  874. return _20;
  875. }
  876. xQueueReceiveFromISR (struct QueueDefinition * xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken)
  877. {
  878. uint32_t ulNewMaskValue;
  879. uint32_t ulNewBASEPRI;
  880. uint32_t D.7351;
  881. uint32_t ulOriginalBASEPRI;
  882. uint32_t ulNewBASEPRI;
  883. uint32_t D.7350;
  884. uint32_t ulNewBASEPRI;
  885. uint32_t ulNewBASEPRI;
  886. const int8_t cRxLock;
  887. const UBaseType_t uxMessagesWaiting;
  888. struct Queue_t * const pxQueue;
  889. UBaseType_t uxSavedInterruptStatus;
  890. BaseType_t xReturn;
  891. BaseType_t D.7142;
  892. int iftmp.25;
  893. long unsigned int _1;
  894. long unsigned int _2;
  895. long unsigned int _3;
  896. struct List_t * _4;
  897. long int _5;
  898. unsigned char cRxLock.26_6;
  899. unsigned char _7;
  900. signed char _8;
  901. int iftmp.25_10;
  902. int iftmp.25_17;
  903. int iftmp.25_18;
  904. BaseType_t _31;
  905. long unsigned int _36;
  906. <bb 2> :
  907. pxQueue_14 = xQueue_13(D);
  908. if (pxQueue_14 == 0B)
  909. goto <bb 3>; [INV]
  910. else
  911. goto <bb 6>; [INV]
  912. <bb 3> :
  913. __asm__ __volatile__(" mov %0, %1
  914. msr basepri, %0
  915. isb
  916. dsb
  917. " : "=r" ulNewBASEPRI_32 : "i" 16 : "memory");
  918. <bb 4> :
  919. <bb 5> :
  920. goto <bb 5>; [INV]
  921. <bb 6> :
  922. if (pvBuffer_15(D) != 0B)
  923. goto <bb 8>; [INV]
  924. else
  925. goto <bb 7>; [INV]
  926. <bb 7> :
  927. _1 = pxQueue_14->uxItemSize;
  928. if (_1 == 0)
  929. goto <bb 8>; [INV]
  930. else
  931. goto <bb 9>; [INV]
  932. <bb 8> :
  933. iftmp.25_18 = 1;
  934. goto <bb 10>; [INV]
  935. <bb 9> :
  936. iftmp.25_17 = 0;
  937. <bb 10> :
  938. # iftmp.25_10 = PHI <iftmp.25_18(8), iftmp.25_17(9)>
  939. if (iftmp.25_10 == 0)
  940. goto <bb 11>; [INV]
  941. else
  942. goto <bb 14>; [INV]
  943. <bb 11> :
  944. __asm__ __volatile__(" mov %0, %1
  945. msr basepri, %0
  946. isb
  947. dsb
  948. " : "=r" ulNewBASEPRI_33 : "i" 16 : "memory");
  949. <bb 12> :
  950. <bb 13> :
  951. goto <bb 13>; [INV]
  952. <bb 14> :
  953. vPortValidateInterruptPriority ();
  954. __asm__ __volatile__(" mrs %0, basepri
  955. mov %1, %2
  956. msr basepri, %1
  957. isb
  958. dsb
  959. " : "=r" ulOriginalBASEPRI_34, "=r" ulNewBASEPRI_35 : "i" 16 : "memory");
  960. _36 = ulOriginalBASEPRI_34;
  961. <bb 15> :
  962. <L29>:
  963. _40 = _36;
  964. <bb 16> :
  965. uxSavedInterruptStatus_20 = _40;
  966. uxMessagesWaiting_21 ={v} pxQueue_14->uxMessagesWaiting;
  967. if (uxMessagesWaiting_21 != 0)
  968. goto <bb 17>; [INV]
  969. else
  970. goto <bb 28>; [INV]
  971. <bb 17> :
  972. cRxLock_23 ={v} pxQueue_14->cRxLock;
  973. prvCopyDataFromQueue (pxQueue_14, pvBuffer_15(D));
  974. _2 = uxMessagesWaiting_21 + 4294967295;
  975. pxQueue_14->uxMessagesWaiting ={v} _2;
  976. if (cRxLock_23 == -1)
  977. goto <bb 18>; [INV]
  978. else
  979. goto <bb 22>; [INV]
  980. <bb 18> :
  981. _3 ={v} pxQueue_14->xTasksWaitingToSend.uxNumberOfItems;
  982. if (_3 != 0)
  983. goto <bb 19>; [INV]
  984. else
  985. goto <bb 27>; [INV]
  986. <bb 19> :
  987. _4 = &pxQueue_14->xTasksWaitingToSend;
  988. _5 = xTaskRemoveFromEventList (_4);
  989. if (_5 != 0)
  990. goto <bb 20>; [INV]
  991. else
  992. goto <bb 27>; [INV]
  993. <bb 20> :
  994. if (pxHigherPriorityTaskWoken_28(D) != 0B)
  995. goto <bb 21>; [INV]
  996. else
  997. goto <bb 27>; [INV]
  998. <bb 21> :
  999. *pxHigherPriorityTaskWoken_28(D) = 1;
  1000. goto <bb 27>; [INV]
  1001. <bb 22> :
  1002. if (cRxLock_23 == 127)
  1003. goto <bb 23>; [INV]
  1004. else
  1005. goto <bb 26>; [INV]
  1006. <bb 23> :
  1007. __asm__ __volatile__(" mov %0, %1
  1008. msr basepri, %0
  1009. isb
  1010. dsb
  1011. " : "=r" ulNewBASEPRI_37 : "i" 16 : "memory");
  1012. <bb 24> :
  1013. <bb 25> :
  1014. goto <bb 25>; [INV]
  1015. <bb 26> :
  1016. cRxLock.26_6 = (unsigned char) cRxLock_23;
  1017. _7 = cRxLock.26_6 + 1;
  1018. _8 = (signed char) _7;
  1019. pxQueue_14->cRxLock ={v} _8;
  1020. <bb 27> :
  1021. xReturn_30 = 1;
  1022. goto <bb 29>; [INV]
  1023. <bb 28> :
  1024. xReturn_22 = 0;
  1025. <bb 29> :
  1026. # xReturn_9 = PHI <xReturn_30(27), xReturn_22(28)>
  1027. ulNewMaskValue_38 = uxSavedInterruptStatus_20;
  1028. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_38 : "memory");
  1029. <bb 30> :
  1030. _31 = xReturn_9;
  1031. <bb 31> :
  1032. <L28>:
  1033. return _31;
  1034. }
  1035. xQueuePeek (struct QueueDefinition * xQueue, void * const pvBuffer, TickType_t xTicksToWait)
  1036. {
  1037. uint32_t ulNewBASEPRI;
  1038. uint32_t ulNewBASEPRI;
  1039. uint32_t ulNewBASEPRI;
  1040. const UBaseType_t uxMessagesWaiting;
  1041. struct Queue_t * const pxQueue;
  1042. int8_t * pcOriginalReadPosition;
  1043. struct TimeOut_t xTimeOut;
  1044. BaseType_t xEntryTimeSet;
  1045. BaseType_t D.7093;
  1046. int iftmp.21;
  1047. int iftmp.20;
  1048. long unsigned int _1;
  1049. long int _2;
  1050. long unsigned int xTicksToWait.22_3;
  1051. long unsigned int _4;
  1052. struct List_t * _5;
  1053. long int _6;
  1054. volatile uint32_t * _7;
  1055. long unsigned int xTicksToWait.23_8;
  1056. signed char _9;
  1057. signed char _10;
  1058. long int _11;
  1059. long int _12;
  1060. struct List_t * _13;
  1061. long unsigned int xTicksToWait.24_14;
  1062. long int _15;
  1063. volatile uint32_t * _16;
  1064. long int _17;
  1065. int iftmp.20_20;
  1066. int iftmp.21_21;
  1067. BaseType_t _22;
  1068. int iftmp.20_35;
  1069. int iftmp.20_36;
  1070. int iftmp.21_38;
  1071. int iftmp.21_39;
  1072. BaseType_t _54;
  1073. BaseType_t _65;
  1074. BaseType_t _74;
  1075. <bb 2> :
  1076. xEntryTimeSet_30 = 0;
  1077. pxQueue_32 = xQueue_31(D);
  1078. if (pxQueue_32 == 0B)
  1079. goto <bb 3>; [INV]
  1080. else
  1081. goto <bb 6>; [INV]
  1082. <bb 3> :
  1083. __asm__ __volatile__(" mov %0, %1
  1084. msr basepri, %0
  1085. isb
  1086. dsb
  1087. " : "=r" ulNewBASEPRI_76 : "i" 16 : "memory");
  1088. <bb 4> :
  1089. <bb 5> :
  1090. goto <bb 5>; [INV]
  1091. <bb 6> :
  1092. if (pvBuffer_33(D) != 0B)
  1093. goto <bb 8>; [INV]
  1094. else
  1095. goto <bb 7>; [INV]
  1096. <bb 7> :
  1097. _1 = pxQueue_32->uxItemSize;
  1098. if (_1 == 0)
  1099. goto <bb 8>; [INV]
  1100. else
  1101. goto <bb 9>; [INV]
  1102. <bb 8> :
  1103. iftmp.20_36 = 1;
  1104. goto <bb 10>; [INV]
  1105. <bb 9> :
  1106. iftmp.20_35 = 0;
  1107. <bb 10> :
  1108. # iftmp.20_20 = PHI <iftmp.20_36(8), iftmp.20_35(9)>
  1109. if (iftmp.20_20 == 0)
  1110. goto <bb 11>; [INV]
  1111. else
  1112. goto <bb 14>; [INV]
  1113. <bb 11> :
  1114. __asm__ __volatile__(" mov %0, %1
  1115. msr basepri, %0
  1116. isb
  1117. dsb
  1118. " : "=r" ulNewBASEPRI_77 : "i" 16 : "memory");
  1119. <bb 12> :
  1120. <bb 13> :
  1121. goto <bb 13>; [INV]
  1122. <bb 14> :
  1123. _2 = xTaskGetSchedulerState ();
  1124. if (_2 != 0)
  1125. goto <bb 16>; [INV]
  1126. else
  1127. goto <bb 15>; [INV]
  1128. <bb 15> :
  1129. xTicksToWait.22_3 = xTicksToWait;
  1130. if (xTicksToWait.22_3 == 0)
  1131. goto <bb 16>; [INV]
  1132. else
  1133. goto <bb 17>; [INV]
  1134. <bb 16> :
  1135. iftmp.21_39 = 1;
  1136. goto <bb 18>; [INV]
  1137. <bb 17> :
  1138. iftmp.21_38 = 0;
  1139. <bb 18> :
  1140. # iftmp.21_21 = PHI <iftmp.21_39(16), iftmp.21_38(17)>
  1141. if (iftmp.21_21 == 0)
  1142. goto <bb 19>; [INV]
  1143. else
  1144. goto <bb 22>; [INV]
  1145. <bb 19> :
  1146. __asm__ __volatile__(" mov %0, %1
  1147. msr basepri, %0
  1148. isb
  1149. dsb
  1150. " : "=r" ulNewBASEPRI_78 : "i" 16 : "memory");
  1151. <bb 20> :
  1152. <bb 21> :
  1153. goto <bb 21>; [INV]
  1154. <bb 22> :
  1155. # xEntryTimeSet_18 = PHI <xEntryTimeSet_30(18), xEntryTimeSet_19(42)>
  1156. vPortEnterCritical ();
  1157. uxMessagesWaiting_41 ={v} pxQueue_32->uxMessagesWaiting;
  1158. if (uxMessagesWaiting_41 != 0)
  1159. goto <bb 23>; [INV]
  1160. else
  1161. goto <bb 27>; [INV]
  1162. <bb 23> :
  1163. pcOriginalReadPosition_66 = pxQueue_32->u.xQueue.pcReadFrom;
  1164. prvCopyDataFromQueue (pxQueue_32, pvBuffer_33(D));
  1165. pxQueue_32->u.xQueue.pcReadFrom = pcOriginalReadPosition_66;
  1166. _4 ={v} pxQueue_32->xTasksWaitingToReceive.uxNumberOfItems;
  1167. if (_4 != 0)
  1168. goto <bb 24>; [INV]
  1169. else
  1170. goto <bb 26>; [INV]
  1171. <bb 24> :
  1172. _5 = &pxQueue_32->xTasksWaitingToReceive;
  1173. _6 = xTaskRemoveFromEventList (_5);
  1174. if (_6 != 0)
  1175. goto <bb 25>; [INV]
  1176. else
  1177. goto <bb 26>; [INV]
  1178. <bb 25> :
  1179. _7 = 3758157060B;
  1180. *_7 ={v} 268435456;
  1181. __asm__ __volatile__("dsb" : : : "memory");
  1182. __asm__ __volatile__("isb");
  1183. <bb 26> :
  1184. vPortExitCritical ();
  1185. _74 = 1;
  1186. // predicted unlikely by early return (on trees) predictor.
  1187. goto <bb 43>; [INV]
  1188. <bb 27> :
  1189. xTicksToWait.23_8 = xTicksToWait;
  1190. if (xTicksToWait.23_8 == 0)
  1191. goto <bb 28>; [INV]
  1192. else
  1193. goto <bb 29>; [INV]
  1194. <bb 28> :
  1195. vPortExitCritical ();
  1196. _65 = 0;
  1197. // predicted unlikely by early return (on trees) predictor.
  1198. goto <bb 43>; [INV]
  1199. <bb 29> :
  1200. if (xEntryTimeSet_18 == 0)
  1201. goto <bb 30>; [INV]
  1202. else
  1203. goto <bb 31>; [INV]
  1204. <bb 30> :
  1205. vTaskInternalSetTimeOutState (&xTimeOut);
  1206. xEntryTimeSet_43 = 1;
  1207. <bb 31> :
  1208. # xEntryTimeSet_19 = PHI <xEntryTimeSet_18(29), xEntryTimeSet_43(30)>
  1209. vPortExitCritical ();
  1210. vTaskSuspendAll ();
  1211. vPortEnterCritical ();
  1212. _9 ={v} pxQueue_32->cRxLock;
  1213. if (_9 == -1)
  1214. goto <bb 32>; [INV]
  1215. else
  1216. goto <bb 33>; [INV]
  1217. <bb 32> :
  1218. pxQueue_32->cRxLock ={v} 0;
  1219. <bb 33> :
  1220. _10 ={v} pxQueue_32->cTxLock;
  1221. if (_10 == -1)
  1222. goto <bb 34>; [INV]
  1223. else
  1224. goto <bb 35>; [INV]
  1225. <bb 34> :
  1226. pxQueue_32->cTxLock ={v} 0;
  1227. <bb 35> :
  1228. vPortExitCritical ();
  1229. _11 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1230. if (_11 == 0)
  1231. goto <bb 36>; [INV]
  1232. else
  1233. goto <bb 40>; [INV]
  1234. <bb 36> :
  1235. _12 = prvIsQueueEmpty (pxQueue_32);
  1236. if (_12 != 0)
  1237. goto <bb 37>; [INV]
  1238. else
  1239. goto <bb 39>; [INV]
  1240. <bb 37> :
  1241. _13 = &pxQueue_32->xTasksWaitingToReceive;
  1242. xTicksToWait.24_14 = xTicksToWait;
  1243. vTaskPlaceOnEventList (_13, xTicksToWait.24_14);
  1244. prvUnlockQueue (pxQueue_32);
  1245. _15 = xTaskResumeAll ();
  1246. if (_15 == 0)
  1247. goto <bb 38>; [INV]
  1248. else
  1249. goto <bb 42>; [INV]
  1250. <bb 38> :
  1251. _16 = 3758157060B;
  1252. *_16 ={v} 268435456;
  1253. __asm__ __volatile__("dsb" : : : "memory");
  1254. __asm__ __volatile__("isb");
  1255. goto <bb 42>; [INV]
  1256. <bb 39> :
  1257. prvUnlockQueue (pxQueue_32);
  1258. xTaskResumeAll ();
  1259. goto <bb 42>; [INV]
  1260. <bb 40> :
  1261. prvUnlockQueue (pxQueue_32);
  1262. xTaskResumeAll ();
  1263. _17 = prvIsQueueEmpty (pxQueue_32);
  1264. if (_17 != 0)
  1265. goto <bb 41>; [INV]
  1266. else
  1267. goto <bb 42>; [INV]
  1268. <bb 41> :
  1269. _54 = 0;
  1270. // predicted unlikely by early return (on trees) predictor.
  1271. goto <bb 43>; [INV]
  1272. <bb 42> :
  1273. goto <bb 22>; [INV]
  1274. <bb 43> :
  1275. # _22 = PHI <_74(26), _65(28), _54(41)>
  1276. xTimeOut ={v} {CLOBBER};
  1277. <bb 44> :
  1278. <L47>:
  1279. return _22;
  1280. }
  1281. xQueueSemaphoreTake (struct QueueDefinition * xQueue, TickType_t xTicksToWait)
  1282. {
  1283. uint32_t ulNewBASEPRI;
  1284. uint32_t ulNewBASEPRI;
  1285. uint32_t ulNewBASEPRI;
  1286. uint32_t ulNewBASEPRI;
  1287. UBaseType_t uxHighestWaitingPriority;
  1288. const UBaseType_t uxSemaphoreCount;
  1289. BaseType_t xInheritanceOccurred;
  1290. struct Queue_t * const pxQueue;
  1291. struct TimeOut_t xTimeOut;
  1292. BaseType_t xEntryTimeSet;
  1293. BaseType_t D.7039;
  1294. int iftmp.16;
  1295. long unsigned int _1;
  1296. long int _2;
  1297. long unsigned int xTicksToWait.17_3;
  1298. long unsigned int _4;
  1299. int8_t * _5;
  1300. struct tskTaskControlBlock * _6;
  1301. long unsigned int _7;
  1302. struct List_t * _8;
  1303. long int _9;
  1304. volatile uint32_t * _10;
  1305. long unsigned int xTicksToWait.18_11;
  1306. signed char _12;
  1307. signed char _13;
  1308. long int _14;
  1309. long int _15;
  1310. int8_t * _16;
  1311. struct tskTaskControlBlock * _17;
  1312. struct List_t * _18;
  1313. long unsigned int xTicksToWait.19_19;
  1314. long int _20;
  1315. volatile uint32_t * _21;
  1316. long int _22;
  1317. struct tskTaskControlBlock * _23;
  1318. int iftmp.16_29;
  1319. BaseType_t _30;
  1320. int iftmp.16_47;
  1321. int iftmp.16_48;
  1322. BaseType_t _68;
  1323. BaseType_t _83;
  1324. BaseType_t _92;
  1325. <bb 2> :
  1326. xEntryTimeSet_41 = 0;
  1327. pxQueue_43 = xQueue_42(D);
  1328. xInheritanceOccurred_44 = 0;
  1329. if (pxQueue_43 == 0B)
  1330. goto <bb 3>; [INV]
  1331. else
  1332. goto <bb 6>; [INV]
  1333. <bb 3> :
  1334. __asm__ __volatile__(" mov %0, %1
  1335. msr basepri, %0
  1336. isb
  1337. dsb
  1338. " : "=r" ulNewBASEPRI_94 : "i" 16 : "memory");
  1339. <bb 4> :
  1340. <bb 5> :
  1341. goto <bb 5>; [INV]
  1342. <bb 6> :
  1343. _1 = pxQueue_43->uxItemSize;
  1344. if (_1 != 0)
  1345. goto <bb 7>; [INV]
  1346. else
  1347. goto <bb 10>; [INV]
  1348. <bb 7> :
  1349. __asm__ __volatile__(" mov %0, %1
  1350. msr basepri, %0
  1351. isb
  1352. dsb
  1353. " : "=r" ulNewBASEPRI_95 : "i" 16 : "memory");
  1354. <bb 8> :
  1355. <bb 9> :
  1356. goto <bb 9>; [INV]
  1357. <bb 10> :
  1358. _2 = xTaskGetSchedulerState ();
  1359. if (_2 != 0)
  1360. goto <bb 12>; [INV]
  1361. else
  1362. goto <bb 11>; [INV]
  1363. <bb 11> :
  1364. xTicksToWait.17_3 = xTicksToWait;
  1365. if (xTicksToWait.17_3 == 0)
  1366. goto <bb 12>; [INV]
  1367. else
  1368. goto <bb 13>; [INV]
  1369. <bb 12> :
  1370. iftmp.16_48 = 1;
  1371. goto <bb 14>; [INV]
  1372. <bb 13> :
  1373. iftmp.16_47 = 0;
  1374. <bb 14> :
  1375. # iftmp.16_29 = PHI <iftmp.16_48(12), iftmp.16_47(13)>
  1376. if (iftmp.16_29 == 0)
  1377. goto <bb 15>; [INV]
  1378. else
  1379. goto <bb 18>; [INV]
  1380. <bb 15> :
  1381. __asm__ __volatile__(" mov %0, %1
  1382. msr basepri, %0
  1383. isb
  1384. dsb
  1385. " : "=r" ulNewBASEPRI_96 : "i" 16 : "memory");
  1386. <bb 16> :
  1387. <bb 17> :
  1388. goto <bb 17>; [INV]
  1389. <bb 18> :
  1390. # xEntryTimeSet_24 = PHI <xEntryTimeSet_41(14), xEntryTimeSet_25(48)>
  1391. # xInheritanceOccurred_26 = PHI <xInheritanceOccurred_44(14), xInheritanceOccurred_28(48)>
  1392. vPortEnterCritical ();
  1393. uxSemaphoreCount_50 ={v} pxQueue_43->uxMessagesWaiting;
  1394. if (uxSemaphoreCount_50 != 0)
  1395. goto <bb 19>; [INV]
  1396. else
  1397. goto <bb 25>; [INV]
  1398. <bb 19> :
  1399. _4 = uxSemaphoreCount_50 + 4294967295;
  1400. pxQueue_43->uxMessagesWaiting ={v} _4;
  1401. _5 = pxQueue_43->pcHead;
  1402. if (_5 == 0B)
  1403. goto <bb 20>; [INV]
  1404. else
  1405. goto <bb 21>; [INV]
  1406. <bb 20> :
  1407. _6 = pvTaskIncrementMutexHeldCount ();
  1408. pxQueue_43->u.xSemaphore.xMutexHolder = _6;
  1409. <bb 21> :
  1410. _7 ={v} pxQueue_43->xTasksWaitingToSend.uxNumberOfItems;
  1411. if (_7 != 0)
  1412. goto <bb 22>; [INV]
  1413. else
  1414. goto <bb 24>; [INV]
  1415. <bb 22> :
  1416. _8 = &pxQueue_43->xTasksWaitingToSend;
  1417. _9 = xTaskRemoveFromEventList (_8);
  1418. if (_9 != 0)
  1419. goto <bb 23>; [INV]
  1420. else
  1421. goto <bb 24>; [INV]
  1422. <bb 23> :
  1423. _10 = 3758157060B;
  1424. *_10 ={v} 268435456;
  1425. __asm__ __volatile__("dsb" : : : "memory");
  1426. __asm__ __volatile__("isb");
  1427. <bb 24> :
  1428. vPortExitCritical ();
  1429. _92 = 1;
  1430. // predicted unlikely by early return (on trees) predictor.
  1431. goto <bb 49>; [INV]
  1432. <bb 25> :
  1433. xTicksToWait.18_11 = xTicksToWait;
  1434. if (xTicksToWait.18_11 == 0)
  1435. goto <bb 26>; [INV]
  1436. else
  1437. goto <bb 31>; [INV]
  1438. <bb 26> :
  1439. if (xInheritanceOccurred_26 != 0)
  1440. goto <bb 27>; [INV]
  1441. else
  1442. goto <bb 30>; [INV]
  1443. <bb 27> :
  1444. __asm__ __volatile__(" mov %0, %1
  1445. msr basepri, %0
  1446. isb
  1447. dsb
  1448. " : "=r" ulNewBASEPRI_97 : "i" 16 : "memory");
  1449. <bb 28> :
  1450. <bb 29> :
  1451. goto <bb 29>; [INV]
  1452. <bb 30> :
  1453. vPortExitCritical ();
  1454. _83 = 0;
  1455. // predicted unlikely by early return (on trees) predictor.
  1456. goto <bb 49>; [INV]
  1457. <bb 31> :
  1458. if (xEntryTimeSet_24 == 0)
  1459. goto <bb 32>; [INV]
  1460. else
  1461. goto <bb 33>; [INV]
  1462. <bb 32> :
  1463. vTaskInternalSetTimeOutState (&xTimeOut);
  1464. xEntryTimeSet_52 = 1;
  1465. <bb 33> :
  1466. # xEntryTimeSet_25 = PHI <xEntryTimeSet_24(31), xEntryTimeSet_52(32)>
  1467. vPortExitCritical ();
  1468. vTaskSuspendAll ();
  1469. vPortEnterCritical ();
  1470. _12 ={v} pxQueue_43->cRxLock;
  1471. if (_12 == -1)
  1472. goto <bb 34>; [INV]
  1473. else
  1474. goto <bb 35>; [INV]
  1475. <bb 34> :
  1476. pxQueue_43->cRxLock ={v} 0;
  1477. <bb 35> :
  1478. _13 ={v} pxQueue_43->cTxLock;
  1479. if (_13 == -1)
  1480. goto <bb 36>; [INV]
  1481. else
  1482. goto <bb 37>; [INV]
  1483. <bb 36> :
  1484. pxQueue_43->cTxLock ={v} 0;
  1485. <bb 37> :
  1486. vPortExitCritical ();
  1487. _14 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1488. if (_14 == 0)
  1489. goto <bb 38>; [INV]
  1490. else
  1491. goto <bb 44>; [INV]
  1492. <bb 38> :
  1493. _15 = prvIsQueueEmpty (pxQueue_43);
  1494. if (_15 != 0)
  1495. goto <bb 39>; [INV]
  1496. else
  1497. goto <bb 43>; [INV]
  1498. <bb 39> :
  1499. _16 = pxQueue_43->pcHead;
  1500. if (_16 == 0B)
  1501. goto <bb 40>; [INV]
  1502. else
  1503. goto <bb 41>; [INV]
  1504. <bb 40> :
  1505. vPortEnterCritical ();
  1506. _17 = pxQueue_43->u.xSemaphore.xMutexHolder;
  1507. xInheritanceOccurred_74 = xTaskPriorityInherit (_17);
  1508. vPortExitCritical ();
  1509. <bb 41> :
  1510. # xInheritanceOccurred_27 = PHI <xInheritanceOccurred_26(39), xInheritanceOccurred_74(40)>
  1511. _18 = &pxQueue_43->xTasksWaitingToReceive;
  1512. xTicksToWait.19_19 = xTicksToWait;
  1513. vTaskPlaceOnEventList (_18, xTicksToWait.19_19);
  1514. prvUnlockQueue (pxQueue_43);
  1515. _20 = xTaskResumeAll ();
  1516. if (_20 == 0)
  1517. goto <bb 42>; [INV]
  1518. else
  1519. goto <bb 48>; [INV]
  1520. <bb 42> :
  1521. _21 = 3758157060B;
  1522. *_21 ={v} 268435456;
  1523. __asm__ __volatile__("dsb" : : : "memory");
  1524. __asm__ __volatile__("isb");
  1525. goto <bb 48>; [INV]
  1526. <bb 43> :
  1527. prvUnlockQueue (pxQueue_43);
  1528. xTaskResumeAll ();
  1529. goto <bb 48>; [INV]
  1530. <bb 44> :
  1531. prvUnlockQueue (pxQueue_43);
  1532. xTaskResumeAll ();
  1533. _22 = prvIsQueueEmpty (pxQueue_43);
  1534. if (_22 != 0)
  1535. goto <bb 45>; [INV]
  1536. else
  1537. goto <bb 48>; [INV]
  1538. <bb 45> :
  1539. if (xInheritanceOccurred_26 != 0)
  1540. goto <bb 46>; [INV]
  1541. else
  1542. goto <bb 47>; [INV]
  1543. <bb 46> :
  1544. vPortEnterCritical ();
  1545. uxHighestWaitingPriority_65 = prvGetDisinheritPriorityAfterTimeout (pxQueue_43);
  1546. _23 = pxQueue_43->u.xSemaphore.xMutexHolder;
  1547. vTaskPriorityDisinheritAfterTimeout (_23, uxHighestWaitingPriority_65);
  1548. vPortExitCritical ();
  1549. <bb 47> :
  1550. _68 = 0;
  1551. // predicted unlikely by early return (on trees) predictor.
  1552. goto <bb 49>; [INV]
  1553. <bb 48> :
  1554. # xInheritanceOccurred_28 = PHI <xInheritanceOccurred_26(43), xInheritanceOccurred_26(44), xInheritanceOccurred_27(42), xInheritanceOccurred_27(41)>
  1555. goto <bb 18>; [INV]
  1556. <bb 49> :
  1557. # _30 = PHI <_92(24), _83(30), _68(47)>
  1558. xTimeOut ={v} {CLOBBER};
  1559. <bb 50> :
  1560. <L54>:
  1561. return _30;
  1562. }
  1563. xQueueReceive (struct QueueDefinition * xQueue, void * const pvBuffer, TickType_t xTicksToWait)
  1564. {
  1565. uint32_t ulNewBASEPRI;
  1566. uint32_t ulNewBASEPRI;
  1567. uint32_t ulNewBASEPRI;
  1568. const UBaseType_t uxMessagesWaiting;
  1569. struct Queue_t * const pxQueue;
  1570. struct TimeOut_t xTimeOut;
  1571. BaseType_t xEntryTimeSet;
  1572. BaseType_t D.6994;
  1573. int iftmp.12;
  1574. int iftmp.11;
  1575. long unsigned int _1;
  1576. long int _2;
  1577. long unsigned int xTicksToWait.13_3;
  1578. long unsigned int _4;
  1579. long unsigned int _5;
  1580. struct List_t * _6;
  1581. long int _7;
  1582. volatile uint32_t * _8;
  1583. long unsigned int xTicksToWait.14_9;
  1584. signed char _10;
  1585. signed char _11;
  1586. long int _12;
  1587. long int _13;
  1588. struct List_t * _14;
  1589. long unsigned int xTicksToWait.15_15;
  1590. long int _16;
  1591. volatile uint32_t * _17;
  1592. long int _18;
  1593. int iftmp.11_21;
  1594. int iftmp.12_22;
  1595. BaseType_t _23;
  1596. int iftmp.11_36;
  1597. int iftmp.11_37;
  1598. int iftmp.12_39;
  1599. int iftmp.12_40;
  1600. BaseType_t _55;
  1601. BaseType_t _66;
  1602. BaseType_t _74;
  1603. <bb 2> :
  1604. xEntryTimeSet_31 = 0;
  1605. pxQueue_33 = xQueue_32(D);
  1606. if (pxQueue_33 == 0B)
  1607. goto <bb 3>; [INV]
  1608. else
  1609. goto <bb 6>; [INV]
  1610. <bb 3> :
  1611. __asm__ __volatile__(" mov %0, %1
  1612. msr basepri, %0
  1613. isb
  1614. dsb
  1615. " : "=r" ulNewBASEPRI_76 : "i" 16 : "memory");
  1616. <bb 4> :
  1617. <bb 5> :
  1618. goto <bb 5>; [INV]
  1619. <bb 6> :
  1620. if (pvBuffer_34(D) != 0B)
  1621. goto <bb 8>; [INV]
  1622. else
  1623. goto <bb 7>; [INV]
  1624. <bb 7> :
  1625. _1 = pxQueue_33->uxItemSize;
  1626. if (_1 == 0)
  1627. goto <bb 8>; [INV]
  1628. else
  1629. goto <bb 9>; [INV]
  1630. <bb 8> :
  1631. iftmp.11_37 = 1;
  1632. goto <bb 10>; [INV]
  1633. <bb 9> :
  1634. iftmp.11_36 = 0;
  1635. <bb 10> :
  1636. # iftmp.11_21 = PHI <iftmp.11_37(8), iftmp.11_36(9)>
  1637. if (iftmp.11_21 == 0)
  1638. goto <bb 11>; [INV]
  1639. else
  1640. goto <bb 14>; [INV]
  1641. <bb 11> :
  1642. __asm__ __volatile__(" mov %0, %1
  1643. msr basepri, %0
  1644. isb
  1645. dsb
  1646. " : "=r" ulNewBASEPRI_77 : "i" 16 : "memory");
  1647. <bb 12> :
  1648. <bb 13> :
  1649. goto <bb 13>; [INV]
  1650. <bb 14> :
  1651. _2 = xTaskGetSchedulerState ();
  1652. if (_2 != 0)
  1653. goto <bb 16>; [INV]
  1654. else
  1655. goto <bb 15>; [INV]
  1656. <bb 15> :
  1657. xTicksToWait.13_3 = xTicksToWait;
  1658. if (xTicksToWait.13_3 == 0)
  1659. goto <bb 16>; [INV]
  1660. else
  1661. goto <bb 17>; [INV]
  1662. <bb 16> :
  1663. iftmp.12_40 = 1;
  1664. goto <bb 18>; [INV]
  1665. <bb 17> :
  1666. iftmp.12_39 = 0;
  1667. <bb 18> :
  1668. # iftmp.12_22 = PHI <iftmp.12_40(16), iftmp.12_39(17)>
  1669. if (iftmp.12_22 == 0)
  1670. goto <bb 19>; [INV]
  1671. else
  1672. goto <bb 22>; [INV]
  1673. <bb 19> :
  1674. __asm__ __volatile__(" mov %0, %1
  1675. msr basepri, %0
  1676. isb
  1677. dsb
  1678. " : "=r" ulNewBASEPRI_78 : "i" 16 : "memory");
  1679. <bb 20> :
  1680. <bb 21> :
  1681. goto <bb 21>; [INV]
  1682. <bb 22> :
  1683. # xEntryTimeSet_19 = PHI <xEntryTimeSet_31(18), xEntryTimeSet_20(42)>
  1684. vPortEnterCritical ();
  1685. uxMessagesWaiting_42 ={v} pxQueue_33->uxMessagesWaiting;
  1686. if (uxMessagesWaiting_42 != 0)
  1687. goto <bb 23>; [INV]
  1688. else
  1689. goto <bb 27>; [INV]
  1690. <bb 23> :
  1691. prvCopyDataFromQueue (pxQueue_33, pvBuffer_34(D));
  1692. _4 = uxMessagesWaiting_42 + 4294967295;
  1693. pxQueue_33->uxMessagesWaiting ={v} _4;
  1694. _5 ={v} pxQueue_33->xTasksWaitingToSend.uxNumberOfItems;
  1695. if (_5 != 0)
  1696. goto <bb 24>; [INV]
  1697. else
  1698. goto <bb 26>; [INV]
  1699. <bb 24> :
  1700. _6 = &pxQueue_33->xTasksWaitingToSend;
  1701. _7 = xTaskRemoveFromEventList (_6);
  1702. if (_7 != 0)
  1703. goto <bb 25>; [INV]
  1704. else
  1705. goto <bb 26>; [INV]
  1706. <bb 25> :
  1707. _8 = 3758157060B;
  1708. *_8 ={v} 268435456;
  1709. __asm__ __volatile__("dsb" : : : "memory");
  1710. __asm__ __volatile__("isb");
  1711. <bb 26> :
  1712. vPortExitCritical ();
  1713. _74 = 1;
  1714. // predicted unlikely by early return (on trees) predictor.
  1715. goto <bb 43>; [INV]
  1716. <bb 27> :
  1717. xTicksToWait.14_9 = xTicksToWait;
  1718. if (xTicksToWait.14_9 == 0)
  1719. goto <bb 28>; [INV]
  1720. else
  1721. goto <bb 29>; [INV]
  1722. <bb 28> :
  1723. vPortExitCritical ();
  1724. _66 = 0;
  1725. // predicted unlikely by early return (on trees) predictor.
  1726. goto <bb 43>; [INV]
  1727. <bb 29> :
  1728. if (xEntryTimeSet_19 == 0)
  1729. goto <bb 30>; [INV]
  1730. else
  1731. goto <bb 31>; [INV]
  1732. <bb 30> :
  1733. vTaskInternalSetTimeOutState (&xTimeOut);
  1734. xEntryTimeSet_44 = 1;
  1735. <bb 31> :
  1736. # xEntryTimeSet_20 = PHI <xEntryTimeSet_19(29), xEntryTimeSet_44(30)>
  1737. vPortExitCritical ();
  1738. vTaskSuspendAll ();
  1739. vPortEnterCritical ();
  1740. _10 ={v} pxQueue_33->cRxLock;
  1741. if (_10 == -1)
  1742. goto <bb 32>; [INV]
  1743. else
  1744. goto <bb 33>; [INV]
  1745. <bb 32> :
  1746. pxQueue_33->cRxLock ={v} 0;
  1747. <bb 33> :
  1748. _11 ={v} pxQueue_33->cTxLock;
  1749. if (_11 == -1)
  1750. goto <bb 34>; [INV]
  1751. else
  1752. goto <bb 35>; [INV]
  1753. <bb 34> :
  1754. pxQueue_33->cTxLock ={v} 0;
  1755. <bb 35> :
  1756. vPortExitCritical ();
  1757. _12 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1758. if (_12 == 0)
  1759. goto <bb 36>; [INV]
  1760. else
  1761. goto <bb 40>; [INV]
  1762. <bb 36> :
  1763. _13 = prvIsQueueEmpty (pxQueue_33);
  1764. if (_13 != 0)
  1765. goto <bb 37>; [INV]
  1766. else
  1767. goto <bb 39>; [INV]
  1768. <bb 37> :
  1769. _14 = &pxQueue_33->xTasksWaitingToReceive;
  1770. xTicksToWait.15_15 = xTicksToWait;
  1771. vTaskPlaceOnEventList (_14, xTicksToWait.15_15);
  1772. prvUnlockQueue (pxQueue_33);
  1773. _16 = xTaskResumeAll ();
  1774. if (_16 == 0)
  1775. goto <bb 38>; [INV]
  1776. else
  1777. goto <bb 42>; [INV]
  1778. <bb 38> :
  1779. _17 = 3758157060B;
  1780. *_17 ={v} 268435456;
  1781. __asm__ __volatile__("dsb" : : : "memory");
  1782. __asm__ __volatile__("isb");
  1783. goto <bb 42>; [INV]
  1784. <bb 39> :
  1785. prvUnlockQueue (pxQueue_33);
  1786. xTaskResumeAll ();
  1787. goto <bb 42>; [INV]
  1788. <bb 40> :
  1789. prvUnlockQueue (pxQueue_33);
  1790. xTaskResumeAll ();
  1791. _18 = prvIsQueueEmpty (pxQueue_33);
  1792. if (_18 != 0)
  1793. goto <bb 41>; [INV]
  1794. else
  1795. goto <bb 42>; [INV]
  1796. <bb 41> :
  1797. _55 = 0;
  1798. // predicted unlikely by early return (on trees) predictor.
  1799. goto <bb 43>; [INV]
  1800. <bb 42> :
  1801. goto <bb 22>; [INV]
  1802. <bb 43> :
  1803. # _23 = PHI <_74(26), _66(28), _55(41)>
  1804. xTimeOut ={v} {CLOBBER};
  1805. <bb 44> :
  1806. <L47>:
  1807. return _23;
  1808. }
  1809. xQueueGiveFromISR (struct QueueDefinition * xQueue, BaseType_t * const pxHigherPriorityTaskWoken)
  1810. {
  1811. uint32_t ulNewMaskValue;
  1812. uint32_t ulNewBASEPRI;
  1813. uint32_t D.7329;
  1814. uint32_t ulOriginalBASEPRI;
  1815. uint32_t ulNewBASEPRI;
  1816. uint32_t D.7328;
  1817. uint32_t ulNewBASEPRI;
  1818. uint32_t ulNewBASEPRI;
  1819. uint32_t ulNewBASEPRI;
  1820. const int8_t cTxLock;
  1821. const UBaseType_t uxMessagesWaiting;
  1822. struct Queue_t * const pxQueue;
  1823. UBaseType_t uxSavedInterruptStatus;
  1824. BaseType_t xReturn;
  1825. BaseType_t D.6968;
  1826. int iftmp.9;
  1827. long unsigned int _1;
  1828. int8_t * _2;
  1829. struct tskTaskControlBlock * _3;
  1830. long unsigned int _4;
  1831. long unsigned int _5;
  1832. long unsigned int _6;
  1833. struct List_t * _7;
  1834. long int _8;
  1835. unsigned char cTxLock.10_9;
  1836. unsigned char _10;
  1837. signed char _11;
  1838. int iftmp.9_13;
  1839. int iftmp.9_19;
  1840. int iftmp.9_20;
  1841. BaseType_t _32;
  1842. long unsigned int _38;
  1843. <bb 2> :
  1844. pxQueue_17 = xQueue_16(D);
  1845. if (pxQueue_17 == 0B)
  1846. goto <bb 3>; [INV]
  1847. else
  1848. goto <bb 6>; [INV]
  1849. <bb 3> :
  1850. __asm__ __volatile__(" mov %0, %1
  1851. msr basepri, %0
  1852. isb
  1853. dsb
  1854. " : "=r" ulNewBASEPRI_33 : "i" 16 : "memory");
  1855. <bb 4> :
  1856. <bb 5> :
  1857. goto <bb 5>; [INV]
  1858. <bb 6> :
  1859. _1 = pxQueue_17->uxItemSize;
  1860. if (_1 != 0)
  1861. goto <bb 7>; [INV]
  1862. else
  1863. goto <bb 10>; [INV]
  1864. <bb 7> :
  1865. __asm__ __volatile__(" mov %0, %1
  1866. msr basepri, %0
  1867. isb
  1868. dsb
  1869. " : "=r" ulNewBASEPRI_34 : "i" 16 : "memory");
  1870. <bb 8> :
  1871. <bb 9> :
  1872. goto <bb 9>; [INV]
  1873. <bb 10> :
  1874. _2 = pxQueue_17->pcHead;
  1875. if (_2 != 0B)
  1876. goto <bb 12>; [INV]
  1877. else
  1878. goto <bb 11>; [INV]
  1879. <bb 11> :
  1880. _3 = pxQueue_17->u.xSemaphore.xMutexHolder;
  1881. if (_3 == 0B)
  1882. goto <bb 12>; [INV]
  1883. else
  1884. goto <bb 13>; [INV]
  1885. <bb 12> :
  1886. iftmp.9_20 = 1;
  1887. goto <bb 14>; [INV]
  1888. <bb 13> :
  1889. iftmp.9_19 = 0;
  1890. <bb 14> :
  1891. # iftmp.9_13 = PHI <iftmp.9_20(12), iftmp.9_19(13)>
  1892. if (iftmp.9_13 == 0)
  1893. goto <bb 15>; [INV]
  1894. else
  1895. goto <bb 18>; [INV]
  1896. <bb 15> :
  1897. __asm__ __volatile__(" mov %0, %1
  1898. msr basepri, %0
  1899. isb
  1900. dsb
  1901. " : "=r" ulNewBASEPRI_35 : "i" 16 : "memory");
  1902. <bb 16> :
  1903. <bb 17> :
  1904. goto <bb 17>; [INV]
  1905. <bb 18> :
  1906. vPortValidateInterruptPriority ();
  1907. __asm__ __volatile__(" mrs %0, basepri
  1908. mov %1, %2
  1909. msr basepri, %1
  1910. isb
  1911. dsb
  1912. " : "=r" ulOriginalBASEPRI_36, "=r" ulNewBASEPRI_37 : "i" 16 : "memory");
  1913. _38 = ulOriginalBASEPRI_36;
  1914. <bb 19> :
  1915. <L32>:
  1916. _42 = _38;
  1917. <bb 20> :
  1918. uxSavedInterruptStatus_22 = _42;
  1919. uxMessagesWaiting_23 ={v} pxQueue_17->uxMessagesWaiting;
  1920. _4 = pxQueue_17->uxLength;
  1921. if (uxMessagesWaiting_23 < _4)
  1922. goto <bb 21>; [INV]
  1923. else
  1924. goto <bb 32>; [INV]
  1925. <bb 21> :
  1926. cTxLock_25 ={v} pxQueue_17->cTxLock;
  1927. _5 = uxMessagesWaiting_23 + 1;
  1928. pxQueue_17->uxMessagesWaiting ={v} _5;
  1929. if (cTxLock_25 == -1)
  1930. goto <bb 22>; [INV]
  1931. else
  1932. goto <bb 26>; [INV]
  1933. <bb 22> :
  1934. _6 ={v} pxQueue_17->xTasksWaitingToReceive.uxNumberOfItems;
  1935. if (_6 != 0)
  1936. goto <bb 23>; [INV]
  1937. else
  1938. goto <bb 31>; [INV]
  1939. <bb 23> :
  1940. _7 = &pxQueue_17->xTasksWaitingToReceive;
  1941. _8 = xTaskRemoveFromEventList (_7);
  1942. if (_8 != 0)
  1943. goto <bb 24>; [INV]
  1944. else
  1945. goto <bb 31>; [INV]
  1946. <bb 24> :
  1947. if (pxHigherPriorityTaskWoken_29(D) != 0B)
  1948. goto <bb 25>; [INV]
  1949. else
  1950. goto <bb 31>; [INV]
  1951. <bb 25> :
  1952. *pxHigherPriorityTaskWoken_29(D) = 1;
  1953. goto <bb 31>; [INV]
  1954. <bb 26> :
  1955. if (cTxLock_25 == 127)
  1956. goto <bb 27>; [INV]
  1957. else
  1958. goto <bb 30>; [INV]
  1959. <bb 27> :
  1960. __asm__ __volatile__(" mov %0, %1
  1961. msr basepri, %0
  1962. isb
  1963. dsb
  1964. " : "=r" ulNewBASEPRI_39 : "i" 16 : "memory");
  1965. <bb 28> :
  1966. <bb 29> :
  1967. goto <bb 29>; [INV]
  1968. <bb 30> :
  1969. cTxLock.10_9 = (unsigned char) cTxLock_25;
  1970. _10 = cTxLock.10_9 + 1;
  1971. _11 = (signed char) _10;
  1972. pxQueue_17->cTxLock ={v} _11;
  1973. <bb 31> :
  1974. xReturn_31 = 1;
  1975. goto <bb 33>; [INV]
  1976. <bb 32> :
  1977. xReturn_24 = 0;
  1978. <bb 33> :
  1979. # xReturn_12 = PHI <xReturn_31(31), xReturn_24(32)>
  1980. ulNewMaskValue_40 = uxSavedInterruptStatus_22;
  1981. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_40 : "memory");
  1982. <bb 34> :
  1983. _32 = xReturn_12;
  1984. <bb 35> :
  1985. <L31>:
  1986. return _32;
  1987. }
  1988. xQueueGenericSendFromISR (struct QueueDefinition * xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition)
  1989. {
  1990. uint32_t ulNewMaskValue;
  1991. uint32_t ulNewBASEPRI;
  1992. uint32_t D.7342;
  1993. uint32_t ulOriginalBASEPRI;
  1994. uint32_t ulNewBASEPRI;
  1995. uint32_t D.7341;
  1996. uint32_t ulNewBASEPRI;
  1997. uint32_t ulNewBASEPRI;
  1998. uint32_t ulNewBASEPRI;
  1999. const UBaseType_t uxPreviousMessagesWaiting;
  2000. const int8_t cTxLock;
  2001. struct Queue_t * const pxQueue;
  2002. UBaseType_t uxSavedInterruptStatus;
  2003. BaseType_t xReturn;
  2004. BaseType_t D.6936;
  2005. int iftmp.7;
  2006. int iftmp.6;
  2007. long unsigned int _1;
  2008. long unsigned int _2;
  2009. long unsigned int _3;
  2010. long unsigned int _4;
  2011. long unsigned int _5;
  2012. struct List_t * _6;
  2013. long int _7;
  2014. unsigned char cTxLock.8_8;
  2015. unsigned char _9;
  2016. signed char _10;
  2017. int iftmp.6_12;
  2018. int iftmp.7_13;
  2019. int iftmp.6_20;
  2020. int iftmp.6_21;
  2021. int iftmp.7_23;
  2022. int iftmp.7_24;
  2023. BaseType_t _36;
  2024. long unsigned int _42;
  2025. <bb 2> :
  2026. pxQueue_17 = xQueue_16(D);
  2027. if (pxQueue_17 == 0B)
  2028. goto <bb 3>; [INV]
  2029. else
  2030. goto <bb 6>; [INV]
  2031. <bb 3> :
  2032. __asm__ __volatile__(" mov %0, %1
  2033. msr basepri, %0
  2034. isb
  2035. dsb
  2036. " : "=r" ulNewBASEPRI_37 : "i" 16 : "memory");
  2037. <bb 4> :
  2038. <bb 5> :
  2039. goto <bb 5>; [INV]
  2040. <bb 6> :
  2041. if (pvItemToQueue_18(D) != 0B)
  2042. goto <bb 8>; [INV]
  2043. else
  2044. goto <bb 7>; [INV]
  2045. <bb 7> :
  2046. _1 = pxQueue_17->uxItemSize;
  2047. if (_1 == 0)
  2048. goto <bb 8>; [INV]
  2049. else
  2050. goto <bb 9>; [INV]
  2051. <bb 8> :
  2052. iftmp.6_21 = 1;
  2053. goto <bb 10>; [INV]
  2054. <bb 9> :
  2055. iftmp.6_20 = 0;
  2056. <bb 10> :
  2057. # iftmp.6_12 = PHI <iftmp.6_21(8), iftmp.6_20(9)>
  2058. if (iftmp.6_12 == 0)
  2059. goto <bb 11>; [INV]
  2060. else
  2061. goto <bb 14>; [INV]
  2062. <bb 11> :
  2063. __asm__ __volatile__(" mov %0, %1
  2064. msr basepri, %0
  2065. isb
  2066. dsb
  2067. " : "=r" ulNewBASEPRI_38 : "i" 16 : "memory");
  2068. <bb 12> :
  2069. <bb 13> :
  2070. goto <bb 13>; [INV]
  2071. <bb 14> :
  2072. if (xCopyPosition_22(D) != 2)
  2073. goto <bb 16>; [INV]
  2074. else
  2075. goto <bb 15>; [INV]
  2076. <bb 15> :
  2077. _2 = pxQueue_17->uxLength;
  2078. if (_2 == 1)
  2079. goto <bb 16>; [INV]
  2080. else
  2081. goto <bb 17>; [INV]
  2082. <bb 16> :
  2083. iftmp.7_24 = 1;
  2084. goto <bb 18>; [INV]
  2085. <bb 17> :
  2086. iftmp.7_23 = 0;
  2087. <bb 18> :
  2088. # iftmp.7_13 = PHI <iftmp.7_24(16), iftmp.7_23(17)>
  2089. if (iftmp.7_13 == 0)
  2090. goto <bb 19>; [INV]
  2091. else
  2092. goto <bb 22>; [INV]
  2093. <bb 19> :
  2094. __asm__ __volatile__(" mov %0, %1
  2095. msr basepri, %0
  2096. isb
  2097. dsb
  2098. " : "=r" ulNewBASEPRI_39 : "i" 16 : "memory");
  2099. <bb 20> :
  2100. <bb 21> :
  2101. goto <bb 21>; [INV]
  2102. <bb 22> :
  2103. vPortValidateInterruptPriority ();
  2104. __asm__ __volatile__(" mrs %0, basepri
  2105. mov %1, %2
  2106. msr basepri, %1
  2107. isb
  2108. dsb
  2109. " : "=r" ulOriginalBASEPRI_40, "=r" ulNewBASEPRI_41 : "i" 16 : "memory");
  2110. _42 = ulOriginalBASEPRI_40;
  2111. <bb 23> :
  2112. <L37>:
  2113. _46 = _42;
  2114. <bb 24> :
  2115. uxSavedInterruptStatus_26 = _46;
  2116. _3 ={v} pxQueue_17->uxMessagesWaiting;
  2117. _4 = pxQueue_17->uxLength;
  2118. if (_3 < _4)
  2119. goto <bb 26>; [INV]
  2120. else
  2121. goto <bb 25>; [INV]
  2122. <bb 25> :
  2123. if (xCopyPosition_22(D) == 2)
  2124. goto <bb 26>; [INV]
  2125. else
  2126. goto <bb 37>; [INV]
  2127. <bb 26> :
  2128. cTxLock_28 ={v} pxQueue_17->cTxLock;
  2129. uxPreviousMessagesWaiting_29 ={v} pxQueue_17->uxMessagesWaiting;
  2130. prvCopyDataToQueue (pxQueue_17, pvItemToQueue_18(D), xCopyPosition_22(D));
  2131. if (cTxLock_28 == -1)
  2132. goto <bb 27>; [INV]
  2133. else
  2134. goto <bb 31>; [INV]
  2135. <bb 27> :
  2136. _5 ={v} pxQueue_17->xTasksWaitingToReceive.uxNumberOfItems;
  2137. if (_5 != 0)
  2138. goto <bb 28>; [INV]
  2139. else
  2140. goto <bb 36>; [INV]
  2141. <bb 28> :
  2142. _6 = &pxQueue_17->xTasksWaitingToReceive;
  2143. _7 = xTaskRemoveFromEventList (_6);
  2144. if (_7 != 0)
  2145. goto <bb 29>; [INV]
  2146. else
  2147. goto <bb 36>; [INV]
  2148. <bb 29> :
  2149. if (pxHigherPriorityTaskWoken_33(D) != 0B)
  2150. goto <bb 30>; [INV]
  2151. else
  2152. goto <bb 36>; [INV]
  2153. <bb 30> :
  2154. *pxHigherPriorityTaskWoken_33(D) = 1;
  2155. goto <bb 36>; [INV]
  2156. <bb 31> :
  2157. if (cTxLock_28 == 127)
  2158. goto <bb 32>; [INV]
  2159. else
  2160. goto <bb 35>; [INV]
  2161. <bb 32> :
  2162. __asm__ __volatile__(" mov %0, %1
  2163. msr basepri, %0
  2164. isb
  2165. dsb
  2166. " : "=r" ulNewBASEPRI_43 : "i" 16 : "memory");
  2167. <bb 33> :
  2168. <bb 34> :
  2169. goto <bb 34>; [INV]
  2170. <bb 35> :
  2171. cTxLock.8_8 = (unsigned char) cTxLock_28;
  2172. _9 = cTxLock.8_8 + 1;
  2173. _10 = (signed char) _9;
  2174. pxQueue_17->cTxLock ={v} _10;
  2175. <bb 36> :
  2176. xReturn_35 = 1;
  2177. goto <bb 38>; [INV]
  2178. <bb 37> :
  2179. xReturn_27 = 0;
  2180. <bb 38> :
  2181. # xReturn_11 = PHI <xReturn_35(36), xReturn_27(37)>
  2182. ulNewMaskValue_44 = uxSavedInterruptStatus_26;
  2183. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_44 : "memory");
  2184. <bb 39> :
  2185. _36 = xReturn_11;
  2186. <bb 40> :
  2187. <L36>:
  2188. return _36;
  2189. }
  2190. xQueueGenericSend (struct QueueDefinition * xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition)
  2191. {
  2192. uint32_t ulNewBASEPRI;
  2193. uint32_t ulNewBASEPRI;
  2194. uint32_t ulNewBASEPRI;
  2195. uint32_t ulNewBASEPRI;
  2196. struct Queue_t * const pxQueue;
  2197. struct TimeOut_t xTimeOut;
  2198. BaseType_t xYieldRequired;
  2199. BaseType_t xEntryTimeSet;
  2200. BaseType_t D.6882;
  2201. int iftmp.2;
  2202. int iftmp.1;
  2203. int iftmp.0;
  2204. long unsigned int _1;
  2205. long unsigned int _2;
  2206. long int _3;
  2207. long unsigned int xTicksToWait.3_4;
  2208. long unsigned int _5;
  2209. long unsigned int _6;
  2210. long unsigned int _7;
  2211. struct List_t * _8;
  2212. long int _9;
  2213. volatile uint32_t * _10;
  2214. volatile uint32_t * _11;
  2215. long unsigned int xTicksToWait.4_12;
  2216. signed char _13;
  2217. signed char _14;
  2218. long int _15;
  2219. long int _16;
  2220. struct List_t * _17;
  2221. long unsigned int xTicksToWait.5_18;
  2222. long int _19;
  2223. volatile uint32_t * _20;
  2224. int iftmp.0_23;
  2225. int iftmp.1_24;
  2226. int iftmp.2_25;
  2227. BaseType_t _26;
  2228. int iftmp.0_39;
  2229. int iftmp.0_40;
  2230. int iftmp.1_42;
  2231. int iftmp.1_43;
  2232. int iftmp.2_45;
  2233. int iftmp.2_46;
  2234. BaseType_t _59;
  2235. BaseType_t _70;
  2236. BaseType_t _81;
  2237. <bb 2> :
  2238. xEntryTimeSet_34 = 0;
  2239. pxQueue_36 = xQueue_35(D);
  2240. if (pxQueue_36 == 0B)
  2241. goto <bb 3>; [INV]
  2242. else
  2243. goto <bb 6>; [INV]
  2244. <bb 3> :
  2245. __asm__ __volatile__(" mov %0, %1
  2246. msr basepri, %0
  2247. isb
  2248. dsb
  2249. " : "=r" ulNewBASEPRI_83 : "i" 16 : "memory");
  2250. <bb 4> :
  2251. <bb 5> :
  2252. goto <bb 5>; [INV]
  2253. <bb 6> :
  2254. if (pvItemToQueue_37(D) != 0B)
  2255. goto <bb 8>; [INV]
  2256. else
  2257. goto <bb 7>; [INV]
  2258. <bb 7> :
  2259. _1 = pxQueue_36->uxItemSize;
  2260. if (_1 == 0)
  2261. goto <bb 8>; [INV]
  2262. else
  2263. goto <bb 9>; [INV]
  2264. <bb 8> :
  2265. iftmp.0_40 = 1;
  2266. goto <bb 10>; [INV]
  2267. <bb 9> :
  2268. iftmp.0_39 = 0;
  2269. <bb 10> :
  2270. # iftmp.0_23 = PHI <iftmp.0_40(8), iftmp.0_39(9)>
  2271. if (iftmp.0_23 == 0)
  2272. goto <bb 11>; [INV]
  2273. else
  2274. goto <bb 14>; [INV]
  2275. <bb 11> :
  2276. __asm__ __volatile__(" mov %0, %1
  2277. msr basepri, %0
  2278. isb
  2279. dsb
  2280. " : "=r" ulNewBASEPRI_84 : "i" 16 : "memory");
  2281. <bb 12> :
  2282. <bb 13> :
  2283. goto <bb 13>; [INV]
  2284. <bb 14> :
  2285. if (xCopyPosition_41(D) != 2)
  2286. goto <bb 16>; [INV]
  2287. else
  2288. goto <bb 15>; [INV]
  2289. <bb 15> :
  2290. _2 = pxQueue_36->uxLength;
  2291. if (_2 == 1)
  2292. goto <bb 16>; [INV]
  2293. else
  2294. goto <bb 17>; [INV]
  2295. <bb 16> :
  2296. iftmp.1_43 = 1;
  2297. goto <bb 18>; [INV]
  2298. <bb 17> :
  2299. iftmp.1_42 = 0;
  2300. <bb 18> :
  2301. # iftmp.1_24 = PHI <iftmp.1_43(16), iftmp.1_42(17)>
  2302. if (iftmp.1_24 == 0)
  2303. goto <bb 19>; [INV]
  2304. else
  2305. goto <bb 22>; [INV]
  2306. <bb 19> :
  2307. __asm__ __volatile__(" mov %0, %1
  2308. msr basepri, %0
  2309. isb
  2310. dsb
  2311. " : "=r" ulNewBASEPRI_85 : "i" 16 : "memory");
  2312. <bb 20> :
  2313. <bb 21> :
  2314. goto <bb 21>; [INV]
  2315. <bb 22> :
  2316. _3 = xTaskGetSchedulerState ();
  2317. if (_3 != 0)
  2318. goto <bb 24>; [INV]
  2319. else
  2320. goto <bb 23>; [INV]
  2321. <bb 23> :
  2322. xTicksToWait.3_4 = xTicksToWait;
  2323. if (xTicksToWait.3_4 == 0)
  2324. goto <bb 24>; [INV]
  2325. else
  2326. goto <bb 25>; [INV]
  2327. <bb 24> :
  2328. iftmp.2_46 = 1;
  2329. goto <bb 26>; [INV]
  2330. <bb 25> :
  2331. iftmp.2_45 = 0;
  2332. <bb 26> :
  2333. # iftmp.2_25 = PHI <iftmp.2_46(24), iftmp.2_45(25)>
  2334. if (iftmp.2_25 == 0)
  2335. goto <bb 27>; [INV]
  2336. else
  2337. goto <bb 30>; [INV]
  2338. <bb 27> :
  2339. __asm__ __volatile__(" mov %0, %1
  2340. msr basepri, %0
  2341. isb
  2342. dsb
  2343. " : "=r" ulNewBASEPRI_86 : "i" 16 : "memory");
  2344. <bb 28> :
  2345. <bb 29> :
  2346. goto <bb 29>; [INV]
  2347. <bb 30> :
  2348. # xEntryTimeSet_21 = PHI <xEntryTimeSet_34(26), xEntryTimeSet_22(52)>
  2349. vPortEnterCritical ();
  2350. _5 ={v} pxQueue_36->uxMessagesWaiting;
  2351. _6 = pxQueue_36->uxLength;
  2352. if (_5 < _6)
  2353. goto <bb 32>; [INV]
  2354. else
  2355. goto <bb 31>; [INV]
  2356. <bb 31> :
  2357. if (xCopyPosition_41(D) == 2)
  2358. goto <bb 32>; [INV]
  2359. else
  2360. goto <bb 38>; [INV]
  2361. <bb 32> :
  2362. xYieldRequired_72 = prvCopyDataToQueue (pxQueue_36, pvItemToQueue_37(D), xCopyPosition_41(D));
  2363. _7 ={v} pxQueue_36->xTasksWaitingToReceive.uxNumberOfItems;
  2364. if (_7 != 0)
  2365. goto <bb 33>; [INV]
  2366. else
  2367. goto <bb 35>; [INV]
  2368. <bb 33> :
  2369. _8 = &pxQueue_36->xTasksWaitingToReceive;
  2370. _9 = xTaskRemoveFromEventList (_8);
  2371. if (_9 != 0)
  2372. goto <bb 34>; [INV]
  2373. else
  2374. goto <bb 37>; [INV]
  2375. <bb 34> :
  2376. _10 = 3758157060B;
  2377. *_10 ={v} 268435456;
  2378. __asm__ __volatile__("dsb" : : : "memory");
  2379. __asm__ __volatile__("isb");
  2380. goto <bb 37>; [INV]
  2381. <bb 35> :
  2382. if (xYieldRequired_72 != 0)
  2383. goto <bb 36>; [INV]
  2384. else
  2385. goto <bb 37>; [INV]
  2386. <bb 36> :
  2387. _11 = 3758157060B;
  2388. *_11 ={v} 268435456;
  2389. __asm__ __volatile__("dsb" : : : "memory");
  2390. __asm__ __volatile__("isb");
  2391. <bb 37> :
  2392. vPortExitCritical ();
  2393. _81 = 1;
  2394. // predicted unlikely by early return (on trees) predictor.
  2395. goto <bb 53>; [INV]
  2396. <bb 38> :
  2397. xTicksToWait.4_12 = xTicksToWait;
  2398. if (xTicksToWait.4_12 == 0)
  2399. goto <bb 39>; [INV]
  2400. else
  2401. goto <bb 40>; [INV]
  2402. <bb 39> :
  2403. vPortExitCritical ();
  2404. _70 = 0;
  2405. // predicted unlikely by early return (on trees) predictor.
  2406. goto <bb 53>; [INV]
  2407. <bb 40> :
  2408. if (xEntryTimeSet_21 == 0)
  2409. goto <bb 41>; [INV]
  2410. else
  2411. goto <bb 42>; [INV]
  2412. <bb 41> :
  2413. vTaskInternalSetTimeOutState (&xTimeOut);
  2414. xEntryTimeSet_49 = 1;
  2415. <bb 42> :
  2416. # xEntryTimeSet_22 = PHI <xEntryTimeSet_21(40), xEntryTimeSet_49(41)>
  2417. vPortExitCritical ();
  2418. vTaskSuspendAll ();
  2419. vPortEnterCritical ();
  2420. _13 ={v} pxQueue_36->cRxLock;
  2421. if (_13 == -1)
  2422. goto <bb 43>; [INV]
  2423. else
  2424. goto <bb 44>; [INV]
  2425. <bb 43> :
  2426. pxQueue_36->cRxLock ={v} 0;
  2427. <bb 44> :
  2428. _14 ={v} pxQueue_36->cTxLock;
  2429. if (_14 == -1)
  2430. goto <bb 45>; [INV]
  2431. else
  2432. goto <bb 46>; [INV]
  2433. <bb 45> :
  2434. pxQueue_36->cTxLock ={v} 0;
  2435. <bb 46> :
  2436. vPortExitCritical ();
  2437. _15 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  2438. if (_15 == 0)
  2439. goto <bb 47>; [INV]
  2440. else
  2441. goto <bb 51>; [INV]
  2442. <bb 47> :
  2443. _16 = prvIsQueueFull (pxQueue_36);
  2444. if (_16 != 0)
  2445. goto <bb 48>; [INV]
  2446. else
  2447. goto <bb 50>; [INV]
  2448. <bb 48> :
  2449. _17 = &pxQueue_36->xTasksWaitingToSend;
  2450. xTicksToWait.5_18 = xTicksToWait;
  2451. vTaskPlaceOnEventList (_17, xTicksToWait.5_18);
  2452. prvUnlockQueue (pxQueue_36);
  2453. _19 = xTaskResumeAll ();
  2454. if (_19 == 0)
  2455. goto <bb 49>; [INV]
  2456. else
  2457. goto <bb 52>; [INV]
  2458. <bb 49> :
  2459. _20 = 3758157060B;
  2460. *_20 ={v} 268435456;
  2461. __asm__ __volatile__("dsb" : : : "memory");
  2462. __asm__ __volatile__("isb");
  2463. goto <bb 52>; [INV]
  2464. <bb 50> :
  2465. prvUnlockQueue (pxQueue_36);
  2466. xTaskResumeAll ();
  2467. goto <bb 52>; [INV]
  2468. <bb 51> :
  2469. prvUnlockQueue (pxQueue_36);
  2470. xTaskResumeAll ();
  2471. _59 = 0;
  2472. // predicted unlikely by early return (on trees) predictor.
  2473. goto <bb 53>; [INV]
  2474. <bb 52> :
  2475. goto <bb 30>; [INV]
  2476. <bb 53> :
  2477. # _26 = PHI <_81(37), _70(39), _59(51)>
  2478. xTimeOut ={v} {CLOBBER};
  2479. <bb 54> :
  2480. <L55>:
  2481. return _26;
  2482. }
  2483. xQueueCreateCountingSemaphore (const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount)
  2484. {
  2485. uint32_t ulNewBASEPRI;
  2486. struct QueueDefinition * xHandle;
  2487. struct QueueDefinition * D.6845;
  2488. struct QueueDefinition * _11;
  2489. <bb 2> :
  2490. xHandle_4 = 0B;
  2491. if (uxMaxCount_5(D) != 0)
  2492. goto <bb 3>; [INV]
  2493. else
  2494. goto <bb 7>; [INV]
  2495. <bb 3> :
  2496. if (uxInitialCount_6(D) <= uxMaxCount_5(D))
  2497. goto <bb 4>; [INV]
  2498. else
  2499. goto <bb 7>; [INV]
  2500. <bb 4> :
  2501. xHandle_9 = xQueueGenericCreate (uxMaxCount_5(D), 0, 2);
  2502. if (xHandle_9 != 0B)
  2503. goto <bb 5>; [INV]
  2504. else
  2505. goto <bb 6>; [INV]
  2506. <bb 5> :
  2507. MEM[(struct Queue_t *)xHandle_9].uxMessagesWaiting ={v} uxInitialCount_6(D);
  2508. <bb 6> :
  2509. goto <bb 11>; [INV]
  2510. <bb 7> :
  2511. if (xHandle_4 == 0B)
  2512. goto <bb 8>; [INV]
  2513. else
  2514. goto <bb 11>; [INV]
  2515. <bb 8> :
  2516. __asm__ __volatile__(" mov %0, %1
  2517. msr basepri, %0
  2518. isb
  2519. dsb
  2520. " : "=r" ulNewBASEPRI_12 : "i" 16 : "memory");
  2521. <bb 9> :
  2522. <bb 10> :
  2523. goto <bb 10>; [INV]
  2524. <bb 11> :
  2525. # xHandle_1 = PHI <xHandle_9(6), xHandle_4(7)>
  2526. _11 = xHandle_1;
  2527. <bb 12> :
  2528. <L10>:
  2529. return _11;
  2530. }
  2531. xQueueTakeMutexRecursive (struct QueueDefinition * xMutex, TickType_t xTicksToWait)
  2532. {
  2533. uint32_t ulNewBASEPRI;
  2534. struct Queue_t * const pxMutex;
  2535. BaseType_t xReturn;
  2536. BaseType_t D.6834;
  2537. struct tskTaskControlBlock * _1;
  2538. struct tskTaskControlBlock * _2;
  2539. long unsigned int _3;
  2540. long unsigned int _4;
  2541. long unsigned int _5;
  2542. long unsigned int _6;
  2543. BaseType_t _19;
  2544. <bb 2> :
  2545. pxMutex_10 = xMutex_9(D);
  2546. if (pxMutex_10 == 0B)
  2547. goto <bb 3>; [INV]
  2548. else
  2549. goto <bb 6>; [INV]
  2550. <bb 3> :
  2551. __asm__ __volatile__(" mov %0, %1
  2552. msr basepri, %0
  2553. isb
  2554. dsb
  2555. " : "=r" ulNewBASEPRI_20 : "i" 16 : "memory");
  2556. <bb 4> :
  2557. <bb 5> :
  2558. goto <bb 5>; [INV]
  2559. <bb 6> :
  2560. _1 = pxMutex_10->u.xSemaphore.xMutexHolder;
  2561. _2 = xTaskGetCurrentTaskHandle ();
  2562. if (_1 == _2)
  2563. goto <bb 7>; [INV]
  2564. else
  2565. goto <bb 8>; [INV]
  2566. <bb 7> :
  2567. _3 = pxMutex_10->u.xSemaphore.uxRecursiveCallCount;
  2568. _4 = _3 + 1;
  2569. pxMutex_10->u.xSemaphore.uxRecursiveCallCount = _4;
  2570. xReturn_18 = 1;
  2571. goto <bb 10>; [INV]
  2572. <bb 8> :
  2573. xReturn_15 = xQueueSemaphoreTake (pxMutex_10, xTicksToWait_13(D));
  2574. if (xReturn_15 != 0)
  2575. goto <bb 9>; [INV]
  2576. else
  2577. goto <bb 10>; [INV]
  2578. <bb 9> :
  2579. _5 = pxMutex_10->u.xSemaphore.uxRecursiveCallCount;
  2580. _6 = _5 + 1;
  2581. pxMutex_10->u.xSemaphore.uxRecursiveCallCount = _6;
  2582. <bb 10> :
  2583. # xReturn_7 = PHI <xReturn_18(7), xReturn_15(8), xReturn_15(9)>
  2584. _19 = xReturn_7;
  2585. <bb 11> :
  2586. <L9>:
  2587. return _19;
  2588. }
  2589. xQueueGiveMutexRecursive (struct QueueDefinition * xMutex)
  2590. {
  2591. uint32_t ulNewBASEPRI;
  2592. struct Queue_t * const pxMutex;
  2593. BaseType_t xReturn;
  2594. BaseType_t D.6824;
  2595. struct tskTaskControlBlock * _1;
  2596. struct tskTaskControlBlock * _2;
  2597. long unsigned int _3;
  2598. long unsigned int _4;
  2599. long unsigned int _5;
  2600. BaseType_t _17;
  2601. <bb 2> :
  2602. pxMutex_10 = xMutex_9(D);
  2603. if (pxMutex_10 == 0B)
  2604. goto <bb 3>; [INV]
  2605. else
  2606. goto <bb 6>; [INV]
  2607. <bb 3> :
  2608. __asm__ __volatile__(" mov %0, %1
  2609. msr basepri, %0
  2610. isb
  2611. dsb
  2612. " : "=r" ulNewBASEPRI_18 : "i" 16 : "memory");
  2613. <bb 4> :
  2614. <bb 5> :
  2615. goto <bb 5>; [INV]
  2616. <bb 6> :
  2617. _1 = pxMutex_10->u.xSemaphore.xMutexHolder;
  2618. _2 = xTaskGetCurrentTaskHandle ();
  2619. if (_1 == _2)
  2620. goto <bb 7>; [INV]
  2621. else
  2622. goto <bb 10>; [INV]
  2623. <bb 7> :
  2624. _3 = pxMutex_10->u.xSemaphore.uxRecursiveCallCount;
  2625. _4 = _3 + 4294967295;
  2626. pxMutex_10->u.xSemaphore.uxRecursiveCallCount = _4;
  2627. _5 = pxMutex_10->u.xSemaphore.uxRecursiveCallCount;
  2628. if (_5 == 0)
  2629. goto <bb 8>; [INV]
  2630. else
  2631. goto <bb 9>; [INV]
  2632. <bb 8> :
  2633. xQueueGenericSend (pxMutex_10, 0B, 0, 0);
  2634. <bb 9> :
  2635. xReturn_16 = 1;
  2636. goto <bb 11>; [INV]
  2637. <bb 10> :
  2638. xReturn_13 = 0;
  2639. <bb 11> :
  2640. # xReturn_6 = PHI <xReturn_16(9), xReturn_13(10)>
  2641. _17 = xReturn_6;
  2642. <bb 12> :
  2643. <L9>:
  2644. return _17;
  2645. }
  2646. xQueueGetMutexHolderFromISR (struct QueueDefinition * xSemaphore)
  2647. {
  2648. uint32_t ulNewBASEPRI;
  2649. struct tskTaskControlBlock * pxReturn;
  2650. struct tskTaskControlBlock * D.6814;
  2651. int8_t * _1;
  2652. struct tskTaskControlBlock * _7;
  2653. <bb 2> :
  2654. if (xSemaphore_3(D) == 0B)
  2655. goto <bb 3>; [INV]
  2656. else
  2657. goto <bb 6>; [INV]
  2658. <bb 3> :
  2659. __asm__ __volatile__(" mov %0, %1
  2660. msr basepri, %0
  2661. isb
  2662. dsb
  2663. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  2664. <bb 4> :
  2665. <bb 5> :
  2666. goto <bb 5>; [INV]
  2667. <bb 6> :
  2668. _1 = MEM[(struct Queue_t *)xSemaphore_3(D)].pcHead;
  2669. if (_1 == 0B)
  2670. goto <bb 7>; [INV]
  2671. else
  2672. goto <bb 8>; [INV]
  2673. <bb 7> :
  2674. pxReturn_6 = MEM[(struct Queue_t *)xSemaphore_3(D)].u.xSemaphore.xMutexHolder;
  2675. goto <bb 9>; [INV]
  2676. <bb 8> :
  2677. pxReturn_5 = 0B;
  2678. <bb 9> :
  2679. # pxReturn_2 = PHI <pxReturn_6(7), pxReturn_5(8)>
  2680. _7 = pxReturn_2;
  2681. <bb 10> :
  2682. <L6>:
  2683. return _7;
  2684. }
  2685. xQueueGetMutexHolder (struct QueueDefinition * xSemaphore)
  2686. {
  2687. uint32_t ulNewBASEPRI;
  2688. struct Queue_t * const pxSemaphore;
  2689. struct tskTaskControlBlock * pxReturn;
  2690. struct tskTaskControlBlock * D.6807;
  2691. int8_t * _1;
  2692. struct tskTaskControlBlock * _10;
  2693. <bb 2> :
  2694. pxSemaphore_4 = xSemaphore_3(D);
  2695. if (xSemaphore_3(D) == 0B)
  2696. goto <bb 3>; [INV]
  2697. else
  2698. goto <bb 6>; [INV]
  2699. <bb 3> :
  2700. __asm__ __volatile__(" mov %0, %1
  2701. msr basepri, %0
  2702. isb
  2703. dsb
  2704. " : "=r" ulNewBASEPRI_11 : "i" 16 : "memory");
  2705. <bb 4> :
  2706. <bb 5> :
  2707. goto <bb 5>; [INV]
  2708. <bb 6> :
  2709. vPortEnterCritical ();
  2710. _1 = pxSemaphore_4->pcHead;
  2711. if (_1 == 0B)
  2712. goto <bb 7>; [INV]
  2713. else
  2714. goto <bb 8>; [INV]
  2715. <bb 7> :
  2716. pxReturn_8 = pxSemaphore_4->u.xSemaphore.xMutexHolder;
  2717. goto <bb 9>; [INV]
  2718. <bb 8> :
  2719. pxReturn_7 = 0B;
  2720. <bb 9> :
  2721. # pxReturn_2 = PHI <pxReturn_8(7), pxReturn_7(8)>
  2722. vPortExitCritical ();
  2723. _10 = pxReturn_2;
  2724. <bb 10> :
  2725. <L6>:
  2726. return _10;
  2727. }
  2728. xQueueCreateMutex (const uint8_t ucQueueType)
  2729. {
  2730. const UBaseType_t uxMutexSize;
  2731. const UBaseType_t uxMutexLength;
  2732. struct QueueDefinition * xNewQueue;
  2733. struct QueueDefinition * D.6800;
  2734. struct QueueDefinition * _8;
  2735. <bb 2> :
  2736. uxMutexLength_1 = 1;
  2737. uxMutexSize_2 = 0;
  2738. xNewQueue_6 = xQueueGenericCreate (uxMutexLength_1, uxMutexSize_2, ucQueueType_4(D));
  2739. prvInitialiseMutex (xNewQueue_6);
  2740. _8 = xNewQueue_6;
  2741. <bb 3> :
  2742. <L0>:
  2743. return _8;
  2744. }
  2745. prvInitialiseMutex (struct Queue_t * pxNewQueue)
  2746. {
  2747. <bb 2> :
  2748. if (pxNewQueue_2(D) != 0B)
  2749. goto <bb 3>; [INV]
  2750. else
  2751. goto <bb 4>; [INV]
  2752. <bb 3> :
  2753. pxNewQueue_2(D)->u.xSemaphore.xMutexHolder = 0B;
  2754. pxNewQueue_2(D)->pcHead = 0B;
  2755. pxNewQueue_2(D)->u.xSemaphore.uxRecursiveCallCount = 0;
  2756. xQueueGenericSend (pxNewQueue_2(D), 0B, 0, 0);
  2757. <bb 4> :
  2758. return;
  2759. }
  2760. prvInitialiseNewQueue (const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t * pucQueueStorage, const uint8_t ucQueueType, struct Queue_t * pxNewQueue)
  2761. {
  2762. <bb 2> :
  2763. if (uxItemSize_2(D) == 0)
  2764. goto <bb 3>; [INV]
  2765. else
  2766. goto <bb 4>; [INV]
  2767. <bb 3> :
  2768. pxNewQueue_4(D)->pcHead = pxNewQueue_4(D);
  2769. goto <bb 5>; [INV]
  2770. <bb 4> :
  2771. pxNewQueue_4(D)->pcHead = pucQueueStorage_5(D);
  2772. <bb 5> :
  2773. pxNewQueue_4(D)->uxLength = uxQueueLength_8(D);
  2774. pxNewQueue_4(D)->uxItemSize = uxItemSize_2(D);
  2775. xQueueGenericReset (pxNewQueue_4(D), 1);
  2776. pxNewQueue_4(D)->ucQueueType = ucQueueType_12(D);
  2777. return;
  2778. }
  2779. xQueueGenericCreate (const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType)
  2780. {
  2781. uint32_t ulNewBASEPRI;
  2782. uint8_t * pucQueueStorage;
  2783. size_t xQueueSizeInBytes;
  2784. struct Queue_t * pxNewQueue;
  2785. struct QueueDefinition * D.6792;
  2786. __complex__ long unsigned int _1;
  2787. long unsigned int _2;
  2788. long unsigned int _3;
  2789. unsigned int _4;
  2790. struct QueueDefinition * _19;
  2791. <bb 2> :
  2792. pxNewQueue_8 = 0B;
  2793. if (uxQueueLength_9(D) != 0)
  2794. goto <bb 3>; [INV]
  2795. else
  2796. goto <bb 8>; [INV]
  2797. <bb 3> :
  2798. _1 = .MUL_OVERFLOW (uxItemSize_10(D), uxQueueLength_9(D));
  2799. _2 = IMAGPART_EXPR <_1>;
  2800. if (_2 == 0)
  2801. goto <bb 4>; [INV]
  2802. else
  2803. goto <bb 8>; [INV]
  2804. <bb 4> :
  2805. _3 = uxQueueLength_9(D) * uxItemSize_10(D);
  2806. if (_3 <= 4294967215)
  2807. goto <bb 5>; [INV]
  2808. else
  2809. goto <bb 8>; [INV]
  2810. <bb 5> :
  2811. xQueueSizeInBytes_11 = uxQueueLength_9(D) * uxItemSize_10(D);
  2812. _4 = xQueueSizeInBytes_11 + 80;
  2813. pxNewQueue_14 = pvPortMalloc (_4);
  2814. if (pxNewQueue_14 != 0B)
  2815. goto <bb 6>; [INV]
  2816. else
  2817. goto <bb 7>; [INV]
  2818. <bb 6> :
  2819. pucQueueStorage_15 = pxNewQueue_14;
  2820. pucQueueStorage_16 = pucQueueStorage_15 + 80;
  2821. prvInitialiseNewQueue (uxQueueLength_9(D), uxItemSize_10(D), pucQueueStorage_16, ucQueueType_17(D), pxNewQueue_14);
  2822. <bb 7> :
  2823. goto <bb 12>; [INV]
  2824. <bb 8> :
  2825. if (pxNewQueue_8 == 0B)
  2826. goto <bb 9>; [INV]
  2827. else
  2828. goto <bb 12>; [INV]
  2829. <bb 9> :
  2830. __asm__ __volatile__(" mov %0, %1
  2831. msr basepri, %0
  2832. isb
  2833. dsb
  2834. " : "=r" ulNewBASEPRI_20 : "i" 16 : "memory");
  2835. <bb 10> :
  2836. <bb 11> :
  2837. goto <bb 11>; [INV]
  2838. <bb 12> :
  2839. # pxNewQueue_5 = PHI <pxNewQueue_14(7), pxNewQueue_8(8)>
  2840. _19 = pxNewQueue_5;
  2841. <bb 13> :
  2842. <L11>:
  2843. return _19;
  2844. }
  2845. xQueueGenericReset (struct QueueDefinition * xQueue, BaseType_t xNewQueue)
  2846. {
  2847. uint32_t ulNewBASEPRI;
  2848. uint32_t ulNewBASEPRI;
  2849. struct Queue_t * const pxQueue;
  2850. BaseType_t xReturn;
  2851. BaseType_t D.6780;
  2852. long unsigned int _1;
  2853. __complex__ long unsigned int _2;
  2854. long unsigned int _3;
  2855. long unsigned int _4;
  2856. long unsigned int _5;
  2857. int8_t * _6;
  2858. long unsigned int _7;
  2859. long unsigned int _8;
  2860. long unsigned int _9;
  2861. int8_t * _10;
  2862. int8_t * _11;
  2863. int8_t * _12;
  2864. long unsigned int _13;
  2865. long unsigned int _14;
  2866. long unsigned int _15;
  2867. long unsigned int _16;
  2868. int8_t * _17;
  2869. long unsigned int _18;
  2870. struct List_t * _19;
  2871. long int _20;
  2872. volatile uint32_t * _21;
  2873. struct List_t * _22;
  2874. struct List_t * _23;
  2875. BaseType_t _47;
  2876. <bb 2> :
  2877. xReturn_27 = 1;
  2878. pxQueue_29 = xQueue_28(D);
  2879. if (pxQueue_29 == 0B)
  2880. goto <bb 3>; [INV]
  2881. else
  2882. goto <bb 6>; [INV]
  2883. <bb 3> :
  2884. __asm__ __volatile__(" mov %0, %1
  2885. msr basepri, %0
  2886. isb
  2887. dsb
  2888. " : "=r" ulNewBASEPRI_48 : "i" 16 : "memory");
  2889. <bb 4> :
  2890. <bb 5> :
  2891. goto <bb 5>; [INV]
  2892. <bb 6> :
  2893. if (pxQueue_29 != 0B)
  2894. goto <bb 7>; [INV]
  2895. else
  2896. goto <bb 15>; [INV]
  2897. <bb 7> :
  2898. _1 = pxQueue_29->uxLength;
  2899. if (_1 != 0)
  2900. goto <bb 8>; [INV]
  2901. else
  2902. goto <bb 15>; [INV]
  2903. <bb 8> :
  2904. _3 = pxQueue_29->uxItemSize;
  2905. _4 = pxQueue_29->uxLength;
  2906. _2 = .MUL_OVERFLOW (_3, _4);
  2907. _5 = IMAGPART_EXPR <_2>;
  2908. if (_5 == 0)
  2909. goto <bb 9>; [INV]
  2910. else
  2911. goto <bb 15>; [INV]
  2912. <bb 9> :
  2913. vPortEnterCritical ();
  2914. _6 = pxQueue_29->pcHead;
  2915. _7 = pxQueue_29->uxLength;
  2916. _8 = pxQueue_29->uxItemSize;
  2917. _9 = _7 * _8;
  2918. _10 = _6 + _9;
  2919. pxQueue_29->u.xQueue.pcTail = _10;
  2920. pxQueue_29->uxMessagesWaiting ={v} 0;
  2921. _11 = pxQueue_29->pcHead;
  2922. pxQueue_29->pcWriteTo = _11;
  2923. _12 = pxQueue_29->pcHead;
  2924. _13 = pxQueue_29->uxLength;
  2925. _14 = _13 + 4294967295;
  2926. _15 = pxQueue_29->uxItemSize;
  2927. _16 = _14 * _15;
  2928. _17 = _12 + _16;
  2929. pxQueue_29->u.xQueue.pcReadFrom = _17;
  2930. pxQueue_29->cRxLock ={v} -1;
  2931. pxQueue_29->cTxLock ={v} -1;
  2932. if (xNewQueue_38(D) == 0)
  2933. goto <bb 10>; [INV]
  2934. else
  2935. goto <bb 13>; [INV]
  2936. <bb 10> :
  2937. _18 ={v} pxQueue_29->xTasksWaitingToSend.uxNumberOfItems;
  2938. if (_18 != 0)
  2939. goto <bb 11>; [INV]
  2940. else
  2941. goto <bb 14>; [INV]
  2942. <bb 11> :
  2943. _19 = &pxQueue_29->xTasksWaitingToSend;
  2944. _20 = xTaskRemoveFromEventList (_19);
  2945. if (_20 != 0)
  2946. goto <bb 12>; [INV]
  2947. else
  2948. goto <bb 14>; [INV]
  2949. <bb 12> :
  2950. _21 = 3758157060B;
  2951. *_21 ={v} 268435456;
  2952. __asm__ __volatile__("dsb" : : : "memory");
  2953. __asm__ __volatile__("isb");
  2954. goto <bb 14>; [INV]
  2955. <bb 13> :
  2956. _22 = &pxQueue_29->xTasksWaitingToSend;
  2957. vListInitialise (_22);
  2958. _23 = &pxQueue_29->xTasksWaitingToReceive;
  2959. vListInitialise (_23);
  2960. <bb 14> :
  2961. vPortExitCritical ();
  2962. goto <bb 16>; [INV]
  2963. <bb 15> :
  2964. xReturn_46 = 0;
  2965. <bb 16> :
  2966. # xReturn_24 = PHI <xReturn_27(14), xReturn_46(15)>
  2967. if (xReturn_24 == 0)
  2968. goto <bb 17>; [INV]
  2969. else
  2970. goto <bb 20>; [INV]
  2971. <bb 17> :
  2972. __asm__ __volatile__(" mov %0, %1
  2973. msr basepri, %0
  2974. isb
  2975. dsb
  2976. " : "=r" ulNewBASEPRI_49 : "i" 16 : "memory");
  2977. <bb 18> :
  2978. <bb 19> :
  2979. goto <bb 19>; [INV]
  2980. <bb 20> :
  2981. _47 = xReturn_24;
  2982. <bb 21> :
  2983. <L20>:
  2984. return _47;
  2985. }