queue.c.022i.opt_local_passes 82 KB

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