queue.c.017i.build_ssa_passes 65 KB

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