queue.c.022i.opt_local_passes 61 KB

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