tasks.c.017i.build_ssa_passes 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988
  1. prvAddCurrentTaskToDelayedList (TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely)
  2. {
  3. struct ListItem_t * const pxIndex;
  4. const TickType_t xConstTickCount;
  5. TickType_t xTimeToWake;
  6. <bb 2> :
  7. xConstTickCount = xTickCount;
  8. pxCurrentTCB.152_1 = pxCurrentTCB;
  9. pxCurrentTCB.152_1->ucDelayAborted = 0;
  10. pxCurrentTCB.153_2 = pxCurrentTCB;
  11. _3 = &pxCurrentTCB.153_2->xStateListItem;
  12. _4 = uxListRemove (_3);
  13. <bb 3> :
  14. if (xTicksToWait == 4294967295)
  15. goto <bb 4>; [INV]
  16. else
  17. goto <bb 6>; [INV]
  18. <bb 4> :
  19. if (xCanBlockIndefinitely != 0)
  20. goto <bb 5>; [INV]
  21. else
  22. goto <bb 6>; [INV]
  23. <bb 5> :
  24. pxIndex = xSuspendedTaskList.pxIndex;
  25. pxCurrentTCB.154_5 = pxCurrentTCB;
  26. pxCurrentTCB.154_5->xStateListItem.pxNext = pxIndex;
  27. pxCurrentTCB.155_6 = pxCurrentTCB;
  28. _7 = pxIndex->pxPrevious;
  29. pxCurrentTCB.155_6->xStateListItem.pxPrevious = _7;
  30. pxCurrentTCB.156_8 = pxCurrentTCB;
  31. _9 = pxIndex->pxPrevious;
  32. _10 = &pxCurrentTCB.156_8->xStateListItem;
  33. _9->pxNext = _10;
  34. pxCurrentTCB.157_11 = pxCurrentTCB;
  35. _12 = &pxCurrentTCB.157_11->xStateListItem;
  36. pxIndex->pxPrevious = _12;
  37. pxCurrentTCB.158_13 = pxCurrentTCB;
  38. pxCurrentTCB.158_13->xStateListItem.pvContainer = &xSuspendedTaskList;
  39. _14 = xSuspendedTaskList.uxNumberOfItems;
  40. _15 = _14 + 1;
  41. xSuspendedTaskList.uxNumberOfItems = _15;
  42. goto <bb 10>; [INV]
  43. <bb 6> :
  44. xTimeToWake = xConstTickCount + xTicksToWait;
  45. pxCurrentTCB.159_16 = pxCurrentTCB;
  46. pxCurrentTCB.159_16->xStateListItem.xItemValue = xTimeToWake;
  47. if (xTimeToWake < xConstTickCount)
  48. goto <bb 7>; [INV]
  49. else
  50. goto <bb 8>; [INV]
  51. <bb 7> :
  52. pxOverflowDelayedTaskList.160_17 = pxOverflowDelayedTaskList;
  53. pxCurrentTCB.161_18 = pxCurrentTCB;
  54. _19 = &pxCurrentTCB.161_18->xStateListItem;
  55. vListInsert (pxOverflowDelayedTaskList.160_17, _19);
  56. goto <bb 10>; [INV]
  57. <bb 8> :
  58. pxDelayedTaskList.162_20 = pxDelayedTaskList;
  59. pxCurrentTCB.163_21 = pxCurrentTCB;
  60. _22 = &pxCurrentTCB.163_21->xStateListItem;
  61. vListInsert (pxDelayedTaskList.162_20, _22);
  62. xNextTaskUnblockTime.164_23 = xNextTaskUnblockTime;
  63. if (xTimeToWake < xNextTaskUnblockTime.164_23)
  64. goto <bb 9>; [INV]
  65. else
  66. goto <bb 10>; [INV]
  67. <bb 9> :
  68. xNextTaskUnblockTime = xTimeToWake;
  69. <bb 10> :
  70. return;
  71. }
  72. ulTaskGenericNotifyValueClear (struct tskTaskControlBlock * xTask, UBaseType_t uxIndexToClear, uint32_t ulBitsToClear)
  73. {
  74. uint32_t ulReturn;
  75. struct TCB_t * pxTCB;
  76. uint32_t D.8224;
  77. struct TCB_t * iftmp.151;
  78. <bb 2> :
  79. if (xTask == 0B)
  80. goto <bb 3>; [INV]
  81. else
  82. goto <bb 4>; [INV]
  83. <bb 3> :
  84. iftmp.151 = pxCurrentTCB;
  85. goto <bb 5>; [INV]
  86. <bb 4> :
  87. iftmp.151 = xTask;
  88. <bb 5> :
  89. pxTCB = iftmp.151;
  90. vPortEnterCritical ();
  91. ulReturn = pxTCB->ulNotifiedValue[uxIndexToClear];
  92. _1 = pxTCB->ulNotifiedValue[uxIndexToClear];
  93. _2 = ~ulBitsToClear;
  94. _3 = _1 & _2;
  95. pxTCB->ulNotifiedValue[uxIndexToClear] = _3;
  96. vPortExitCritical ();
  97. D.8224 = ulReturn;
  98. <bb 6> :
  99. <L3>:
  100. return D.8224;
  101. }
  102. xTaskGenericNotifyStateClear (struct tskTaskControlBlock * xTask, UBaseType_t uxIndexToClear)
  103. {
  104. BaseType_t xReturn;
  105. struct TCB_t * pxTCB;
  106. BaseType_t D.8218;
  107. struct TCB_t * iftmp.150;
  108. <bb 2> :
  109. if (uxIndexToClear != 0)
  110. goto <bb 3>; [INV]
  111. else
  112. goto <bb 5>; [INV]
  113. <bb 3> :
  114. vPortRaiseBASEPRI ();
  115. <bb 4> :
  116. goto <bb 4>; [INV]
  117. <bb 5> :
  118. if (xTask == 0B)
  119. goto <bb 6>; [INV]
  120. else
  121. goto <bb 7>; [INV]
  122. <bb 6> :
  123. iftmp.150 = pxCurrentTCB;
  124. goto <bb 8>; [INV]
  125. <bb 7> :
  126. iftmp.150 = xTask;
  127. <bb 8> :
  128. pxTCB = iftmp.150;
  129. vPortEnterCritical ();
  130. _1 = pxTCB->ucNotifyState[uxIndexToClear];
  131. if (_1 == 2)
  132. goto <bb 9>; [INV]
  133. else
  134. goto <bb 10>; [INV]
  135. <bb 9> :
  136. pxTCB->ucNotifyState[uxIndexToClear] = 0;
  137. xReturn = 1;
  138. goto <bb 11>; [INV]
  139. <bb 10> :
  140. xReturn = 0;
  141. <bb 11> :
  142. vPortExitCritical ();
  143. D.8218 = xReturn;
  144. <bb 12> :
  145. <L9>:
  146. return D.8218;
  147. }
  148. vTaskGenericNotifyGiveFromISR (struct tskTaskControlBlock * xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t * pxHigherPriorityTaskWoken)
  149. {
  150. struct ListItem_t * const pxIndex;
  151. struct ListItem_t * const pxIndex;
  152. struct List_t * const pxList;
  153. UBaseType_t uxSavedInterruptStatus;
  154. uint8_t ucOriginalNotifyState;
  155. struct TCB_t * pxTCB;
  156. <bb 2> :
  157. if (xTaskToNotify == 0B)
  158. goto <bb 3>; [INV]
  159. else
  160. goto <bb 5>; [INV]
  161. <bb 3> :
  162. vPortRaiseBASEPRI ();
  163. <bb 4> :
  164. goto <bb 4>; [INV]
  165. <bb 5> :
  166. if (uxIndexToNotify != 0)
  167. goto <bb 6>; [INV]
  168. else
  169. goto <bb 8>; [INV]
  170. <bb 6> :
  171. vPortRaiseBASEPRI ();
  172. <bb 7> :
  173. goto <bb 7>; [INV]
  174. <bb 8> :
  175. vPortValidateInterruptPriority ();
  176. pxTCB = xTaskToNotify;
  177. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  178. ucOriginalNotifyState = pxTCB->ucNotifyState[uxIndexToNotify];
  179. pxTCB->ucNotifyState[uxIndexToNotify] = 2;
  180. _1 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  181. _2 = _1 + 1;
  182. pxTCB->ulNotifiedValue[uxIndexToNotify] = _2;
  183. if (ucOriginalNotifyState == 1)
  184. goto <bb 9>; [INV]
  185. else
  186. goto <bb 23>; [INV]
  187. <bb 9> :
  188. _3 = pxTCB->xEventListItem.pvContainer;
  189. if (_3 != 0B)
  190. goto <bb 10>; [INV]
  191. else
  192. goto <bb 12>; [INV]
  193. <bb 10> :
  194. vPortRaiseBASEPRI ();
  195. <bb 11> :
  196. goto <bb 11>; [INV]
  197. <bb 12> :
  198. uxSchedulerSuspended.147_4 = uxSchedulerSuspended;
  199. if (uxSchedulerSuspended.147_4 == 0)
  200. goto <bb 13>; [INV]
  201. else
  202. goto <bb 18>; [INV]
  203. <bb 13> :
  204. pxList = pxTCB->xStateListItem.pvContainer;
  205. _5 = pxTCB->xStateListItem.pxNext;
  206. _6 = pxTCB->xStateListItem.pxPrevious;
  207. _5->pxPrevious = _6;
  208. _7 = pxTCB->xStateListItem.pxPrevious;
  209. _8 = pxTCB->xStateListItem.pxNext;
  210. _7->pxNext = _8;
  211. _9 = pxList->pxIndex;
  212. _10 = &pxTCB->xStateListItem;
  213. if (_9 == _10)
  214. goto <bb 14>; [INV]
  215. else
  216. goto <bb 15>; [INV]
  217. <bb 14> :
  218. _11 = pxTCB->xStateListItem.pxPrevious;
  219. pxList->pxIndex = _11;
  220. <bb 15> :
  221. pxTCB->xStateListItem.pvContainer = 0B;
  222. _12 = pxList->uxNumberOfItems;
  223. _13 = _12 + 4294967295;
  224. pxList->uxNumberOfItems = _13;
  225. _14 = pxTCB->uxPriority;
  226. uxTopReadyPriority.148_15 = uxTopReadyPriority;
  227. if (_14 > uxTopReadyPriority.148_15)
  228. goto <bb 16>; [INV]
  229. else
  230. goto <bb 17>; [INV]
  231. <bb 16> :
  232. _16 = pxTCB->uxPriority;
  233. uxTopReadyPriority = _16;
  234. <bb 17> :
  235. _17 = pxTCB->uxPriority;
  236. pxIndex = pxReadyTasksLists[_17].pxIndex;
  237. pxTCB->xStateListItem.pxNext = pxIndex;
  238. _18 = pxIndex->pxPrevious;
  239. pxTCB->xStateListItem.pxPrevious = _18;
  240. _19 = pxIndex->pxPrevious;
  241. _20 = &pxTCB->xStateListItem;
  242. _19->pxNext = _20;
  243. _21 = &pxTCB->xStateListItem;
  244. pxIndex->pxPrevious = _21;
  245. _22 = pxTCB->uxPriority;
  246. _23 = &pxReadyTasksLists[_22];
  247. pxTCB->xStateListItem.pvContainer = _23;
  248. _24 = pxTCB->uxPriority;
  249. _25 = pxReadyTasksLists[_24].uxNumberOfItems;
  250. _26 = _25 + 1;
  251. pxReadyTasksLists[_24].uxNumberOfItems = _26;
  252. goto <bb 19>; [INV]
  253. <bb 18> :
  254. pxIndex = xPendingReadyList.pxIndex;
  255. pxTCB->xEventListItem.pxNext = pxIndex;
  256. _27 = pxIndex->pxPrevious;
  257. pxTCB->xEventListItem.pxPrevious = _27;
  258. _28 = pxIndex->pxPrevious;
  259. _29 = &pxTCB->xEventListItem;
  260. _28->pxNext = _29;
  261. _30 = &pxTCB->xEventListItem;
  262. pxIndex->pxPrevious = _30;
  263. pxTCB->xEventListItem.pvContainer = &xPendingReadyList;
  264. _31 = xPendingReadyList.uxNumberOfItems;
  265. _32 = _31 + 1;
  266. xPendingReadyList.uxNumberOfItems = _32;
  267. <bb 19> :
  268. _33 = pxTCB->uxPriority;
  269. pxCurrentTCB.149_34 = pxCurrentTCB;
  270. _35 = pxCurrentTCB.149_34->uxPriority;
  271. if (_33 > _35)
  272. goto <bb 20>; [INV]
  273. else
  274. goto <bb 23>; [INV]
  275. <bb 20> :
  276. if (pxHigherPriorityTaskWoken != 0B)
  277. goto <bb 21>; [INV]
  278. else
  279. goto <bb 22>; [INV]
  280. <bb 21> :
  281. *pxHigherPriorityTaskWoken = 1;
  282. <bb 22> :
  283. xYieldPending = 1;
  284. <bb 23> :
  285. vPortSetBASEPRI (uxSavedInterruptStatus);
  286. return;
  287. }
  288. xTaskGenericNotifyFromISR (struct tskTaskControlBlock * xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t * pulPreviousNotificationValue, BaseType_t * pxHigherPriorityTaskWoken)
  289. {
  290. struct ListItem_t * const pxIndex;
  291. struct ListItem_t * const pxIndex;
  292. struct List_t * const pxList;
  293. UBaseType_t uxSavedInterruptStatus;
  294. BaseType_t xReturn;
  295. uint8_t ucOriginalNotifyState;
  296. struct TCB_t * pxTCB;
  297. BaseType_t D.8187;
  298. <bb 2> :
  299. xReturn = 1;
  300. if (xTaskToNotify == 0B)
  301. goto <bb 3>; [INV]
  302. else
  303. goto <bb 5>; [INV]
  304. <bb 3> :
  305. vPortRaiseBASEPRI ();
  306. <bb 4> :
  307. goto <bb 4>; [INV]
  308. <bb 5> :
  309. if (uxIndexToNotify != 0)
  310. goto <bb 6>; [INV]
  311. else
  312. goto <bb 8>; [INV]
  313. <bb 6> :
  314. vPortRaiseBASEPRI ();
  315. <bb 7> :
  316. goto <bb 7>; [INV]
  317. <bb 8> :
  318. vPortValidateInterruptPriority ();
  319. pxTCB = xTaskToNotify;
  320. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  321. if (pulPreviousNotificationValue != 0B)
  322. goto <bb 9>; [INV]
  323. else
  324. goto <bb 10>; [INV]
  325. <bb 9> :
  326. _1 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  327. *pulPreviousNotificationValue = _1;
  328. <bb 10> :
  329. ucOriginalNotifyState = pxTCB->ucNotifyState[uxIndexToNotify];
  330. pxTCB->ucNotifyState[uxIndexToNotify] = 2;
  331. switch (eAction) <default: <L16> [INV], case 0: <L15> [INV], case 1: <L8> [INV], case 2: <L9> [INV], case 3: <L10> [INV], case 4: <L11> [INV]>
  332. <bb 11> :
  333. <L8>:
  334. _2 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  335. _3 = ulValue | _2;
  336. pxTCB->ulNotifiedValue[uxIndexToNotify] = _3;
  337. goto <bb 23>; [INV]
  338. <bb 12> :
  339. <L9>:
  340. _4 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  341. _5 = _4 + 1;
  342. pxTCB->ulNotifiedValue[uxIndexToNotify] = _5;
  343. goto <bb 23>; [INV]
  344. <bb 13> :
  345. <L10>:
  346. pxTCB->ulNotifiedValue[uxIndexToNotify] = ulValue;
  347. goto <bb 23>; [INV]
  348. <bb 14> :
  349. <L11>:
  350. if (ucOriginalNotifyState != 2)
  351. goto <bb 15>; [INV]
  352. else
  353. goto <bb 16>; [INV]
  354. <bb 15> :
  355. pxTCB->ulNotifiedValue[uxIndexToNotify] = ulValue;
  356. goto <bb 17>; [INV]
  357. <bb 16> :
  358. xReturn = 0;
  359. <bb 17> :
  360. goto <bb 23>; [INV]
  361. <bb 18> :
  362. <L15>:
  363. goto <bb 23>; [INV]
  364. <bb 19> :
  365. <L16>:
  366. xTickCount.143_6 = xTickCount;
  367. if (xTickCount.143_6 != 0)
  368. goto <bb 20>; [INV]
  369. else
  370. goto <bb 22>; [INV]
  371. <bb 20> :
  372. vPortRaiseBASEPRI ();
  373. <bb 21> :
  374. goto <bb 21>; [INV]
  375. <bb 22> :
  376. <bb 23> :
  377. if (ucOriginalNotifyState == 1)
  378. goto <bb 24>; [INV]
  379. else
  380. goto <bb 38>; [INV]
  381. <bb 24> :
  382. _7 = pxTCB->xEventListItem.pvContainer;
  383. if (_7 != 0B)
  384. goto <bb 25>; [INV]
  385. else
  386. goto <bb 27>; [INV]
  387. <bb 25> :
  388. vPortRaiseBASEPRI ();
  389. <bb 26> :
  390. goto <bb 26>; [INV]
  391. <bb 27> :
  392. uxSchedulerSuspended.144_8 = uxSchedulerSuspended;
  393. if (uxSchedulerSuspended.144_8 == 0)
  394. goto <bb 28>; [INV]
  395. else
  396. goto <bb 33>; [INV]
  397. <bb 28> :
  398. pxList = pxTCB->xStateListItem.pvContainer;
  399. _9 = pxTCB->xStateListItem.pxNext;
  400. _10 = pxTCB->xStateListItem.pxPrevious;
  401. _9->pxPrevious = _10;
  402. _11 = pxTCB->xStateListItem.pxPrevious;
  403. _12 = pxTCB->xStateListItem.pxNext;
  404. _11->pxNext = _12;
  405. _13 = pxList->pxIndex;
  406. _14 = &pxTCB->xStateListItem;
  407. if (_13 == _14)
  408. goto <bb 29>; [INV]
  409. else
  410. goto <bb 30>; [INV]
  411. <bb 29> :
  412. _15 = pxTCB->xStateListItem.pxPrevious;
  413. pxList->pxIndex = _15;
  414. <bb 30> :
  415. pxTCB->xStateListItem.pvContainer = 0B;
  416. _16 = pxList->uxNumberOfItems;
  417. _17 = _16 + 4294967295;
  418. pxList->uxNumberOfItems = _17;
  419. _18 = pxTCB->uxPriority;
  420. uxTopReadyPriority.145_19 = uxTopReadyPriority;
  421. if (_18 > uxTopReadyPriority.145_19)
  422. goto <bb 31>; [INV]
  423. else
  424. goto <bb 32>; [INV]
  425. <bb 31> :
  426. _20 = pxTCB->uxPriority;
  427. uxTopReadyPriority = _20;
  428. <bb 32> :
  429. _21 = pxTCB->uxPriority;
  430. pxIndex = pxReadyTasksLists[_21].pxIndex;
  431. pxTCB->xStateListItem.pxNext = pxIndex;
  432. _22 = pxIndex->pxPrevious;
  433. pxTCB->xStateListItem.pxPrevious = _22;
  434. _23 = pxIndex->pxPrevious;
  435. _24 = &pxTCB->xStateListItem;
  436. _23->pxNext = _24;
  437. _25 = &pxTCB->xStateListItem;
  438. pxIndex->pxPrevious = _25;
  439. _26 = pxTCB->uxPriority;
  440. _27 = &pxReadyTasksLists[_26];
  441. pxTCB->xStateListItem.pvContainer = _27;
  442. _28 = pxTCB->uxPriority;
  443. _29 = pxReadyTasksLists[_28].uxNumberOfItems;
  444. _30 = _29 + 1;
  445. pxReadyTasksLists[_28].uxNumberOfItems = _30;
  446. goto <bb 34>; [INV]
  447. <bb 33> :
  448. pxIndex = xPendingReadyList.pxIndex;
  449. pxTCB->xEventListItem.pxNext = pxIndex;
  450. _31 = pxIndex->pxPrevious;
  451. pxTCB->xEventListItem.pxPrevious = _31;
  452. _32 = pxIndex->pxPrevious;
  453. _33 = &pxTCB->xEventListItem;
  454. _32->pxNext = _33;
  455. _34 = &pxTCB->xEventListItem;
  456. pxIndex->pxPrevious = _34;
  457. pxTCB->xEventListItem.pvContainer = &xPendingReadyList;
  458. _35 = xPendingReadyList.uxNumberOfItems;
  459. _36 = _35 + 1;
  460. xPendingReadyList.uxNumberOfItems = _36;
  461. <bb 34> :
  462. _37 = pxTCB->uxPriority;
  463. pxCurrentTCB.146_38 = pxCurrentTCB;
  464. _39 = pxCurrentTCB.146_38->uxPriority;
  465. if (_37 > _39)
  466. goto <bb 35>; [INV]
  467. else
  468. goto <bb 38>; [INV]
  469. <bb 35> :
  470. if (pxHigherPriorityTaskWoken != 0B)
  471. goto <bb 36>; [INV]
  472. else
  473. goto <bb 37>; [INV]
  474. <bb 36> :
  475. *pxHigherPriorityTaskWoken = 1;
  476. <bb 37> :
  477. xYieldPending = 1;
  478. <bb 38> :
  479. vPortSetBASEPRI (uxSavedInterruptStatus);
  480. D.8187 = xReturn;
  481. <bb 39> :
  482. <L38>:
  483. return D.8187;
  484. }
  485. xTaskGenericNotify (struct tskTaskControlBlock * xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t * pulPreviousNotificationValue)
  486. {
  487. struct ListItem_t * const pxIndex;
  488. struct List_t * const pxList;
  489. uint8_t ucOriginalNotifyState;
  490. BaseType_t xReturn;
  491. struct TCB_t * pxTCB;
  492. BaseType_t D.8158;
  493. <bb 2> :
  494. xReturn = 1;
  495. if (uxIndexToNotify != 0)
  496. goto <bb 3>; [INV]
  497. else
  498. goto <bb 5>; [INV]
  499. <bb 3> :
  500. vPortRaiseBASEPRI ();
  501. <bb 4> :
  502. goto <bb 4>; [INV]
  503. <bb 5> :
  504. if (xTaskToNotify == 0B)
  505. goto <bb 6>; [INV]
  506. else
  507. goto <bb 8>; [INV]
  508. <bb 6> :
  509. vPortRaiseBASEPRI ();
  510. <bb 7> :
  511. goto <bb 7>; [INV]
  512. <bb 8> :
  513. pxTCB = xTaskToNotify;
  514. vPortEnterCritical ();
  515. if (pulPreviousNotificationValue != 0B)
  516. goto <bb 9>; [INV]
  517. else
  518. goto <bb 10>; [INV]
  519. <bb 9> :
  520. _1 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  521. *pulPreviousNotificationValue = _1;
  522. <bb 10> :
  523. ucOriginalNotifyState = pxTCB->ucNotifyState[uxIndexToNotify];
  524. pxTCB->ucNotifyState[uxIndexToNotify] = 2;
  525. switch (eAction) <default: <L16> [INV], case 0: <L15> [INV], case 1: <L8> [INV], case 2: <L9> [INV], case 3: <L10> [INV], case 4: <L11> [INV]>
  526. <bb 11> :
  527. <L8>:
  528. _2 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  529. _3 = ulValue | _2;
  530. pxTCB->ulNotifiedValue[uxIndexToNotify] = _3;
  531. goto <bb 23>; [INV]
  532. <bb 12> :
  533. <L9>:
  534. _4 = pxTCB->ulNotifiedValue[uxIndexToNotify];
  535. _5 = _4 + 1;
  536. pxTCB->ulNotifiedValue[uxIndexToNotify] = _5;
  537. goto <bb 23>; [INV]
  538. <bb 13> :
  539. <L10>:
  540. pxTCB->ulNotifiedValue[uxIndexToNotify] = ulValue;
  541. goto <bb 23>; [INV]
  542. <bb 14> :
  543. <L11>:
  544. if (ucOriginalNotifyState != 2)
  545. goto <bb 15>; [INV]
  546. else
  547. goto <bb 16>; [INV]
  548. <bb 15> :
  549. pxTCB->ulNotifiedValue[uxIndexToNotify] = ulValue;
  550. goto <bb 17>; [INV]
  551. <bb 16> :
  552. xReturn = 0;
  553. <bb 17> :
  554. goto <bb 23>; [INV]
  555. <bb 18> :
  556. <L15>:
  557. goto <bb 23>; [INV]
  558. <bb 19> :
  559. <L16>:
  560. xTickCount.140_6 = xTickCount;
  561. if (xTickCount.140_6 != 0)
  562. goto <bb 20>; [INV]
  563. else
  564. goto <bb 22>; [INV]
  565. <bb 20> :
  566. vPortRaiseBASEPRI ();
  567. <bb 21> :
  568. goto <bb 21>; [INV]
  569. <bb 22> :
  570. <bb 23> :
  571. if (ucOriginalNotifyState == 1)
  572. goto <bb 24>; [INV]
  573. else
  574. goto <bb 33>; [INV]
  575. <bb 24> :
  576. pxList = pxTCB->xStateListItem.pvContainer;
  577. _7 = pxTCB->xStateListItem.pxNext;
  578. _8 = pxTCB->xStateListItem.pxPrevious;
  579. _7->pxPrevious = _8;
  580. _9 = pxTCB->xStateListItem.pxPrevious;
  581. _10 = pxTCB->xStateListItem.pxNext;
  582. _9->pxNext = _10;
  583. _11 = pxList->pxIndex;
  584. _12 = &pxTCB->xStateListItem;
  585. if (_11 == _12)
  586. goto <bb 25>; [INV]
  587. else
  588. goto <bb 26>; [INV]
  589. <bb 25> :
  590. _13 = pxTCB->xStateListItem.pxPrevious;
  591. pxList->pxIndex = _13;
  592. <bb 26> :
  593. pxTCB->xStateListItem.pvContainer = 0B;
  594. _14 = pxList->uxNumberOfItems;
  595. _15 = _14 + 4294967295;
  596. pxList->uxNumberOfItems = _15;
  597. _16 = pxTCB->uxPriority;
  598. uxTopReadyPriority.141_17 = uxTopReadyPriority;
  599. if (_16 > uxTopReadyPriority.141_17)
  600. goto <bb 27>; [INV]
  601. else
  602. goto <bb 28>; [INV]
  603. <bb 27> :
  604. _18 = pxTCB->uxPriority;
  605. uxTopReadyPriority = _18;
  606. <bb 28> :
  607. _19 = pxTCB->uxPriority;
  608. pxIndex = pxReadyTasksLists[_19].pxIndex;
  609. pxTCB->xStateListItem.pxNext = pxIndex;
  610. _20 = pxIndex->pxPrevious;
  611. pxTCB->xStateListItem.pxPrevious = _20;
  612. _21 = pxIndex->pxPrevious;
  613. _22 = &pxTCB->xStateListItem;
  614. _21->pxNext = _22;
  615. _23 = &pxTCB->xStateListItem;
  616. pxIndex->pxPrevious = _23;
  617. _24 = pxTCB->uxPriority;
  618. _25 = &pxReadyTasksLists[_24];
  619. pxTCB->xStateListItem.pvContainer = _25;
  620. _26 = pxTCB->uxPriority;
  621. _27 = pxReadyTasksLists[_26].uxNumberOfItems;
  622. _28 = _27 + 1;
  623. pxReadyTasksLists[_26].uxNumberOfItems = _28;
  624. _29 = pxTCB->xEventListItem.pvContainer;
  625. if (_29 != 0B)
  626. goto <bb 29>; [INV]
  627. else
  628. goto <bb 31>; [INV]
  629. <bb 29> :
  630. vPortRaiseBASEPRI ();
  631. <bb 30> :
  632. goto <bb 30>; [INV]
  633. <bb 31> :
  634. _30 = pxTCB->uxPriority;
  635. pxCurrentTCB.142_31 = pxCurrentTCB;
  636. _32 = pxCurrentTCB.142_31->uxPriority;
  637. if (_30 > _32)
  638. goto <bb 32>; [INV]
  639. else
  640. goto <bb 33>; [INV]
  641. <bb 32> :
  642. _33 = 3758157060B;
  643. *_33 = 268435456;
  644. __asm__ __volatile__("dsb" : : : "memory");
  645. __asm__ __volatile__("isb");
  646. <bb 33> :
  647. vPortExitCritical ();
  648. D.8158 = xReturn;
  649. <bb 34> :
  650. <L34>:
  651. return D.8158;
  652. }
  653. xTaskGenericNotifyWait (UBaseType_t uxIndexToWait, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t * pulNotificationValue, TickType_t xTicksToWait)
  654. {
  655. BaseType_t xReturn;
  656. BaseType_t D.8133;
  657. struct TCB_t * pxCurrentTCB.138;
  658. struct TCB_t * pxCurrentTCB.134;
  659. <bb 2> :
  660. if (uxIndexToWait != 0)
  661. goto <bb 3>; [INV]
  662. else
  663. goto <bb 5>; [INV]
  664. <bb 3> :
  665. vPortRaiseBASEPRI ();
  666. <bb 4> :
  667. goto <bb 4>; [INV]
  668. <bb 5> :
  669. vPortEnterCritical ();
  670. pxCurrentTCB.133_1 = pxCurrentTCB;
  671. _2 = pxCurrentTCB.133_1->ucNotifyState[uxIndexToWait];
  672. if (_2 != 2)
  673. goto <bb 6>; [INV]
  674. else
  675. goto <bb 8>; [INV]
  676. <bb 6> :
  677. pxCurrentTCB.134 = pxCurrentTCB;
  678. _3 = pxCurrentTCB.134->ulNotifiedValue[uxIndexToWait];
  679. _4 = ~ulBitsToClearOnEntry;
  680. _5 = _3 & _4;
  681. pxCurrentTCB.134->ulNotifiedValue[uxIndexToWait] = _5;
  682. pxCurrentTCB.135_6 = pxCurrentTCB;
  683. pxCurrentTCB.135_6->ucNotifyState[uxIndexToWait] = 1;
  684. if (xTicksToWait != 0)
  685. goto <bb 7>; [INV]
  686. else
  687. goto <bb 8>; [INV]
  688. <bb 7> :
  689. prvAddCurrentTaskToDelayedList (xTicksToWait, 1);
  690. _7 = 3758157060B;
  691. *_7 = 268435456;
  692. __asm__ __volatile__("dsb" : : : "memory");
  693. __asm__ __volatile__("isb");
  694. <bb 8> :
  695. vPortExitCritical ();
  696. vPortEnterCritical ();
  697. if (pulNotificationValue != 0B)
  698. goto <bb 9>; [INV]
  699. else
  700. goto <bb 10>; [INV]
  701. <bb 9> :
  702. pxCurrentTCB.136_8 = pxCurrentTCB;
  703. _9 = pxCurrentTCB.136_8->ulNotifiedValue[uxIndexToWait];
  704. *pulNotificationValue = _9;
  705. <bb 10> :
  706. pxCurrentTCB.137_10 = pxCurrentTCB;
  707. _11 = pxCurrentTCB.137_10->ucNotifyState[uxIndexToWait];
  708. if (_11 != 2)
  709. goto <bb 11>; [INV]
  710. else
  711. goto <bb 12>; [INV]
  712. <bb 11> :
  713. xReturn = 0;
  714. goto <bb 13>; [INV]
  715. <bb 12> :
  716. pxCurrentTCB.138 = pxCurrentTCB;
  717. _12 = pxCurrentTCB.138->ulNotifiedValue[uxIndexToWait];
  718. _13 = ~ulBitsToClearOnExit;
  719. _14 = _12 & _13;
  720. pxCurrentTCB.138->ulNotifiedValue[uxIndexToWait] = _14;
  721. xReturn = 1;
  722. <bb 13> :
  723. pxCurrentTCB.139_15 = pxCurrentTCB;
  724. pxCurrentTCB.139_15->ucNotifyState[uxIndexToWait] = 0;
  725. vPortExitCritical ();
  726. D.8133 = xReturn;
  727. <bb 14> :
  728. <L14>:
  729. return D.8133;
  730. }
  731. ulTaskGenericNotifyTake (UBaseType_t uxIndexToWait, BaseType_t xClearCountOnExit, TickType_t xTicksToWait)
  732. {
  733. uint32_t ulReturn;
  734. uint32_t D.8116;
  735. <bb 2> :
  736. if (uxIndexToWait != 0)
  737. goto <bb 3>; [INV]
  738. else
  739. goto <bb 5>; [INV]
  740. <bb 3> :
  741. vPortRaiseBASEPRI ();
  742. <bb 4> :
  743. goto <bb 4>; [INV]
  744. <bb 5> :
  745. vPortEnterCritical ();
  746. pxCurrentTCB.127_1 = pxCurrentTCB;
  747. _2 = pxCurrentTCB.127_1->ulNotifiedValue[uxIndexToWait];
  748. if (_2 == 0)
  749. goto <bb 6>; [INV]
  750. else
  751. goto <bb 8>; [INV]
  752. <bb 6> :
  753. pxCurrentTCB.128_3 = pxCurrentTCB;
  754. pxCurrentTCB.128_3->ucNotifyState[uxIndexToWait] = 1;
  755. if (xTicksToWait != 0)
  756. goto <bb 7>; [INV]
  757. else
  758. goto <bb 8>; [INV]
  759. <bb 7> :
  760. prvAddCurrentTaskToDelayedList (xTicksToWait, 1);
  761. _4 = 3758157060B;
  762. *_4 = 268435456;
  763. __asm__ __volatile__("dsb" : : : "memory");
  764. __asm__ __volatile__("isb");
  765. <bb 8> :
  766. vPortExitCritical ();
  767. vPortEnterCritical ();
  768. pxCurrentTCB.129_5 = pxCurrentTCB;
  769. ulReturn = pxCurrentTCB.129_5->ulNotifiedValue[uxIndexToWait];
  770. if (ulReturn != 0)
  771. goto <bb 9>; [INV]
  772. else
  773. goto <bb 12>; [INV]
  774. <bb 9> :
  775. if (xClearCountOnExit != 0)
  776. goto <bb 10>; [INV]
  777. else
  778. goto <bb 11>; [INV]
  779. <bb 10> :
  780. pxCurrentTCB.130_6 = pxCurrentTCB;
  781. pxCurrentTCB.130_6->ulNotifiedValue[uxIndexToWait] = 0;
  782. goto <bb 12>; [INV]
  783. <bb 11> :
  784. pxCurrentTCB.131_7 = pxCurrentTCB;
  785. _8 = ulReturn + 4294967295;
  786. pxCurrentTCB.131_7->ulNotifiedValue[uxIndexToWait] = _8;
  787. <bb 12> :
  788. pxCurrentTCB.132_9 = pxCurrentTCB;
  789. pxCurrentTCB.132_9->ucNotifyState[uxIndexToWait] = 0;
  790. vPortExitCritical ();
  791. D.8116 = ulReturn;
  792. <bb 13> :
  793. <L15>:
  794. return D.8116;
  795. }
  796. pvTaskIncrementMutexHeldCount ()
  797. {
  798. struct tskTaskControlBlock * D.8100;
  799. <bb 2> :
  800. pxCurrentTCB.125_1 = pxCurrentTCB;
  801. if (pxCurrentTCB.125_1 != 0B)
  802. goto <bb 3>; [INV]
  803. else
  804. goto <bb 4>; [INV]
  805. <bb 3> :
  806. pxCurrentTCB.126_2 = pxCurrentTCB;
  807. _3 = pxCurrentTCB.126_2->uxMutexesHeld;
  808. _4 = _3 + 1;
  809. pxCurrentTCB.126_2->uxMutexesHeld = _4;
  810. <bb 4> :
  811. D.8100 = pxCurrentTCB;
  812. <bb 5> :
  813. <L2>:
  814. return D.8100;
  815. }
  816. uxTaskResetEventItemValue ()
  817. {
  818. TickType_t uxReturn;
  819. TickType_t D.8096;
  820. <bb 2> :
  821. pxCurrentTCB.122_1 = pxCurrentTCB;
  822. uxReturn = pxCurrentTCB.122_1->xEventListItem.xItemValue;
  823. pxCurrentTCB.123_2 = pxCurrentTCB;
  824. _3 = pxCurrentTCB.123_2->uxPriority;
  825. pxCurrentTCB.124_4 = pxCurrentTCB;
  826. _5 = 5 - _3;
  827. pxCurrentTCB.124_4->xEventListItem.xItemValue = _5;
  828. D.8096 = uxReturn;
  829. <bb 3> :
  830. <L0>:
  831. return D.8096;
  832. }
  833. vTaskList (char * pcWriteBuffer)
  834. {
  835. char cStatus;
  836. UBaseType_t x;
  837. UBaseType_t uxArraySize;
  838. struct TaskStatus_t * pxTaskStatusArray;
  839. <bb 2> :
  840. *pcWriteBuffer = 0;
  841. uxArraySize = uxCurrentNumberOfTasks;
  842. uxCurrentNumberOfTasks.121_1 = uxCurrentNumberOfTasks;
  843. _2 = uxCurrentNumberOfTasks.121_1 * 36;
  844. pxTaskStatusArray = pvPortMalloc (_2);
  845. if (pxTaskStatusArray != 0B)
  846. goto <bb 3>; [INV]
  847. else
  848. goto <bb 14>; [INV]
  849. <bb 3> :
  850. uxArraySize = uxTaskGetSystemState (pxTaskStatusArray, uxArraySize, 0B);
  851. x = 0;
  852. goto <bb 12>; [INV]
  853. <bb 4> :
  854. _3 = x * 36;
  855. _4 = pxTaskStatusArray + _3;
  856. _5 = _4->eCurrentState;
  857. switch (_5) <default: <L7> [INV], case 0: <L2> [INV], case 1: <L3> [INV], case 2: <L4> [INV], case 3: <L5> [INV], case 4: <L6> [INV]>
  858. <bb 5> :
  859. <L2>:
  860. cStatus = 88;
  861. goto <bb 11>; [INV]
  862. <bb 6> :
  863. <L3>:
  864. cStatus = 82;
  865. goto <bb 11>; [INV]
  866. <bb 7> :
  867. <L4>:
  868. cStatus = 66;
  869. goto <bb 11>; [INV]
  870. <bb 8> :
  871. <L5>:
  872. cStatus = 83;
  873. goto <bb 11>; [INV]
  874. <bb 9> :
  875. <L6>:
  876. cStatus = 68;
  877. goto <bb 11>; [INV]
  878. <bb 10> :
  879. <L7>:
  880. cStatus = 0;
  881. <bb 11> :
  882. _6 = x * 36;
  883. _7 = pxTaskStatusArray + _6;
  884. _8 = _7->pcTaskName;
  885. pcWriteBuffer = prvWriteNameToBuffer (pcWriteBuffer, _8);
  886. _9 = (int) cStatus;
  887. _10 = x * 36;
  888. _11 = pxTaskStatusArray + _10;
  889. _12 = _11->uxCurrentPriority;
  890. _13 = x * 36;
  891. _14 = pxTaskStatusArray + _13;
  892. _15 = _14->usStackHighWaterMark;
  893. _16 = (unsigned int) _15;
  894. _17 = x * 36;
  895. _18 = pxTaskStatusArray + _17;
  896. _19 = _18->xTaskNumber;
  897. sprintf (pcWriteBuffer, "\t%c\t%u\t%u\t%u\r\n", _9, _12, _16, _19);
  898. _20 = strlen (pcWriteBuffer);
  899. pcWriteBuffer = pcWriteBuffer + _20;
  900. x = x + 1;
  901. <bb 12> :
  902. if (x < uxArraySize)
  903. goto <bb 4>; [INV]
  904. else
  905. goto <bb 13>; [INV]
  906. <bb 13> :
  907. vPortFree (pxTaskStatusArray);
  908. <bb 14> :
  909. return;
  910. }
  911. prvWriteNameToBuffer (char * pcBuffer, const char * pcTaskName)
  912. {
  913. size_t x;
  914. char * D.8091;
  915. <bb 2> :
  916. strcpy (pcBuffer, pcTaskName);
  917. x = strlen (pcBuffer);
  918. goto <bb 4>; [INV]
  919. <bb 3> :
  920. _1 = pcBuffer + x;
  921. *_1 = 32;
  922. x = x + 1;
  923. <bb 4> :
  924. if (x <= 8)
  925. goto <bb 3>; [INV]
  926. else
  927. goto <bb 5>; [INV]
  928. <bb 5> :
  929. _2 = pcBuffer + x;
  930. *_2 = 0;
  931. D.8091 = pcBuffer + x;
  932. <bb 6> :
  933. <L3>:
  934. return D.8091;
  935. }
  936. vTaskPriorityDisinheritAfterTimeout (struct tskTaskControlBlock * const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask)
  937. {
  938. struct ListItem_t * const pxIndex;
  939. const UBaseType_t uxOnlyOneMutexHeld;
  940. UBaseType_t uxPriorityToUse;
  941. UBaseType_t uxPriorityUsedOnEntry;
  942. struct TCB_t * const pxTCB;
  943. <bb 2> :
  944. pxTCB = pxMutexHolder;
  945. uxOnlyOneMutexHeld = 1;
  946. if (pxMutexHolder != 0B)
  947. goto <bb 3>; [INV]
  948. else
  949. goto <bb 21>; [INV]
  950. <bb 3> :
  951. _1 = pxTCB->uxMutexesHeld;
  952. if (_1 == 0)
  953. goto <bb 4>; [INV]
  954. else
  955. goto <bb 6>; [INV]
  956. <bb 4> :
  957. vPortRaiseBASEPRI ();
  958. <bb 5> :
  959. goto <bb 5>; [INV]
  960. <bb 6> :
  961. _2 = pxTCB->uxBasePriority;
  962. if (uxHighestPriorityWaitingTask > _2)
  963. goto <bb 7>; [INV]
  964. else
  965. goto <bb 8>; [INV]
  966. <bb 7> :
  967. uxPriorityToUse = uxHighestPriorityWaitingTask;
  968. goto <bb 9>; [INV]
  969. <bb 8> :
  970. uxPriorityToUse = pxTCB->uxBasePriority;
  971. <bb 9> :
  972. _3 = pxTCB->uxPriority;
  973. if (uxPriorityToUse != _3)
  974. goto <bb 10>; [INV]
  975. else
  976. goto <bb 21>; [INV]
  977. <bb 10> :
  978. _4 = pxTCB->uxMutexesHeld;
  979. if (uxOnlyOneMutexHeld == _4)
  980. goto <bb 11>; [INV]
  981. else
  982. goto <bb 21>; [INV]
  983. <bb 11> :
  984. pxCurrentTCB.119_5 = pxCurrentTCB;
  985. if (pxTCB == pxCurrentTCB.119_5)
  986. goto <bb 12>; [INV]
  987. else
  988. goto <bb 14>; [INV]
  989. <bb 12> :
  990. vPortRaiseBASEPRI ();
  991. <bb 13> :
  992. goto <bb 13>; [INV]
  993. <bb 14> :
  994. uxPriorityUsedOnEntry = pxTCB->uxPriority;
  995. pxTCB->uxPriority = uxPriorityToUse;
  996. _6 = pxTCB->xEventListItem.xItemValue;
  997. _7 = (signed int) _6;
  998. if (_7 >= 0)
  999. goto <bb 15>; [INV]
  1000. else
  1001. goto <bb 16>; [INV]
  1002. <bb 15> :
  1003. _8 = 5 - uxPriorityToUse;
  1004. pxTCB->xEventListItem.xItemValue = _8;
  1005. <bb 16> :
  1006. _9 = pxTCB->xStateListItem.pvContainer;
  1007. _10 = &pxReadyTasksLists[uxPriorityUsedOnEntry];
  1008. if (_9 == _10)
  1009. goto <bb 17>; [INV]
  1010. else
  1011. goto <bb 21>; [INV]
  1012. <bb 17> :
  1013. _11 = &pxTCB->xStateListItem;
  1014. _12 = uxListRemove (_11);
  1015. <bb 18> :
  1016. _13 = pxTCB->uxPriority;
  1017. uxTopReadyPriority.120_14 = uxTopReadyPriority;
  1018. if (_13 > uxTopReadyPriority.120_14)
  1019. goto <bb 19>; [INV]
  1020. else
  1021. goto <bb 20>; [INV]
  1022. <bb 19> :
  1023. _15 = pxTCB->uxPriority;
  1024. uxTopReadyPriority = _15;
  1025. <bb 20> :
  1026. _16 = pxTCB->uxPriority;
  1027. pxIndex = pxReadyTasksLists[_16].pxIndex;
  1028. pxTCB->xStateListItem.pxNext = pxIndex;
  1029. _17 = pxIndex->pxPrevious;
  1030. pxTCB->xStateListItem.pxPrevious = _17;
  1031. _18 = pxIndex->pxPrevious;
  1032. _19 = &pxTCB->xStateListItem;
  1033. _18->pxNext = _19;
  1034. _20 = &pxTCB->xStateListItem;
  1035. pxIndex->pxPrevious = _20;
  1036. _21 = pxTCB->uxPriority;
  1037. _22 = &pxReadyTasksLists[_21];
  1038. pxTCB->xStateListItem.pvContainer = _22;
  1039. _23 = pxTCB->uxPriority;
  1040. _24 = pxReadyTasksLists[_23].uxNumberOfItems;
  1041. _25 = _24 + 1;
  1042. pxReadyTasksLists[_23].uxNumberOfItems = _25;
  1043. <bb 21> :
  1044. return;
  1045. }
  1046. xTaskPriorityDisinherit (struct tskTaskControlBlock * const pxMutexHolder)
  1047. {
  1048. struct ListItem_t * const pxIndex;
  1049. BaseType_t xReturn;
  1050. struct TCB_t * const pxTCB;
  1051. BaseType_t D.8062;
  1052. <bb 2> :
  1053. pxTCB = pxMutexHolder;
  1054. xReturn = 0;
  1055. if (pxMutexHolder != 0B)
  1056. goto <bb 3>; [INV]
  1057. else
  1058. goto <bb 15>; [INV]
  1059. <bb 3> :
  1060. pxCurrentTCB.117_1 = pxCurrentTCB;
  1061. if (pxTCB != pxCurrentTCB.117_1)
  1062. goto <bb 4>; [INV]
  1063. else
  1064. goto <bb 6>; [INV]
  1065. <bb 4> :
  1066. vPortRaiseBASEPRI ();
  1067. <bb 5> :
  1068. goto <bb 5>; [INV]
  1069. <bb 6> :
  1070. _2 = pxTCB->uxMutexesHeld;
  1071. if (_2 == 0)
  1072. goto <bb 7>; [INV]
  1073. else
  1074. goto <bb 9>; [INV]
  1075. <bb 7> :
  1076. vPortRaiseBASEPRI ();
  1077. <bb 8> :
  1078. goto <bb 8>; [INV]
  1079. <bb 9> :
  1080. _3 = pxTCB->uxMutexesHeld;
  1081. _4 = _3 + 4294967295;
  1082. pxTCB->uxMutexesHeld = _4;
  1083. _5 = pxTCB->uxPriority;
  1084. _6 = pxTCB->uxBasePriority;
  1085. if (_5 != _6)
  1086. goto <bb 10>; [INV]
  1087. else
  1088. goto <bb 15>; [INV]
  1089. <bb 10> :
  1090. _7 = pxTCB->uxMutexesHeld;
  1091. if (_7 == 0)
  1092. goto <bb 11>; [INV]
  1093. else
  1094. goto <bb 15>; [INV]
  1095. <bb 11> :
  1096. _8 = &pxTCB->xStateListItem;
  1097. _9 = uxListRemove (_8);
  1098. <bb 12> :
  1099. _10 = pxTCB->uxBasePriority;
  1100. pxTCB->uxPriority = _10;
  1101. _11 = pxTCB->uxPriority;
  1102. _12 = 5 - _11;
  1103. pxTCB->xEventListItem.xItemValue = _12;
  1104. _13 = pxTCB->uxPriority;
  1105. uxTopReadyPriority.118_14 = uxTopReadyPriority;
  1106. if (_13 > uxTopReadyPriority.118_14)
  1107. goto <bb 13>; [INV]
  1108. else
  1109. goto <bb 14>; [INV]
  1110. <bb 13> :
  1111. _15 = pxTCB->uxPriority;
  1112. uxTopReadyPriority = _15;
  1113. <bb 14> :
  1114. _16 = pxTCB->uxPriority;
  1115. pxIndex = pxReadyTasksLists[_16].pxIndex;
  1116. pxTCB->xStateListItem.pxNext = pxIndex;
  1117. _17 = pxIndex->pxPrevious;
  1118. pxTCB->xStateListItem.pxPrevious = _17;
  1119. _18 = pxIndex->pxPrevious;
  1120. _19 = &pxTCB->xStateListItem;
  1121. _18->pxNext = _19;
  1122. _20 = &pxTCB->xStateListItem;
  1123. pxIndex->pxPrevious = _20;
  1124. _21 = pxTCB->uxPriority;
  1125. _22 = &pxReadyTasksLists[_21];
  1126. pxTCB->xStateListItem.pvContainer = _22;
  1127. _23 = pxTCB->uxPriority;
  1128. _24 = pxReadyTasksLists[_23].uxNumberOfItems;
  1129. _25 = _24 + 1;
  1130. pxReadyTasksLists[_23].uxNumberOfItems = _25;
  1131. xReturn = 1;
  1132. <bb 15> :
  1133. D.8062 = xReturn;
  1134. <bb 16> :
  1135. <L20>:
  1136. return D.8062;
  1137. }
  1138. xTaskPriorityInherit (struct tskTaskControlBlock * const pxMutexHolder)
  1139. {
  1140. struct ListItem_t * const pxIndex;
  1141. BaseType_t xReturn;
  1142. struct TCB_t * const pxMutexHolderTCB;
  1143. BaseType_t D.8042;
  1144. <bb 2> :
  1145. pxMutexHolderTCB = pxMutexHolder;
  1146. xReturn = 0;
  1147. if (pxMutexHolder != 0B)
  1148. goto <bb 3>; [INV]
  1149. else
  1150. goto <bb 15>; [INV]
  1151. <bb 3> :
  1152. _1 = pxMutexHolderTCB->uxPriority;
  1153. pxCurrentTCB.111_2 = pxCurrentTCB;
  1154. _3 = pxCurrentTCB.111_2->uxPriority;
  1155. if (_1 < _3)
  1156. goto <bb 4>; [INV]
  1157. else
  1158. goto <bb 13>; [INV]
  1159. <bb 4> :
  1160. _4 = pxMutexHolderTCB->xEventListItem.xItemValue;
  1161. _5 = (signed int) _4;
  1162. if (_5 >= 0)
  1163. goto <bb 5>; [INV]
  1164. else
  1165. goto <bb 6>; [INV]
  1166. <bb 5> :
  1167. pxCurrentTCB.112_6 = pxCurrentTCB;
  1168. _7 = pxCurrentTCB.112_6->uxPriority;
  1169. _8 = 5 - _7;
  1170. pxMutexHolderTCB->xEventListItem.xItemValue = _8;
  1171. <bb 6> :
  1172. _9 = pxMutexHolderTCB->xStateListItem.pvContainer;
  1173. _10 = pxMutexHolderTCB->uxPriority;
  1174. _11 = &pxReadyTasksLists[_10];
  1175. if (_9 == _11)
  1176. goto <bb 7>; [INV]
  1177. else
  1178. goto <bb 11>; [INV]
  1179. <bb 7> :
  1180. _12 = &pxMutexHolderTCB->xStateListItem;
  1181. _13 = uxListRemove (_12);
  1182. <bb 8> :
  1183. pxCurrentTCB.113_14 = pxCurrentTCB;
  1184. _15 = pxCurrentTCB.113_14->uxPriority;
  1185. pxMutexHolderTCB->uxPriority = _15;
  1186. _16 = pxMutexHolderTCB->uxPriority;
  1187. uxTopReadyPriority.114_17 = uxTopReadyPriority;
  1188. if (_16 > uxTopReadyPriority.114_17)
  1189. goto <bb 9>; [INV]
  1190. else
  1191. goto <bb 10>; [INV]
  1192. <bb 9> :
  1193. _18 = pxMutexHolderTCB->uxPriority;
  1194. uxTopReadyPriority = _18;
  1195. <bb 10> :
  1196. _19 = pxMutexHolderTCB->uxPriority;
  1197. pxIndex = pxReadyTasksLists[_19].pxIndex;
  1198. pxMutexHolderTCB->xStateListItem.pxNext = pxIndex;
  1199. _20 = pxIndex->pxPrevious;
  1200. pxMutexHolderTCB->xStateListItem.pxPrevious = _20;
  1201. _21 = pxIndex->pxPrevious;
  1202. _22 = &pxMutexHolderTCB->xStateListItem;
  1203. _21->pxNext = _22;
  1204. _23 = &pxMutexHolderTCB->xStateListItem;
  1205. pxIndex->pxPrevious = _23;
  1206. _24 = pxMutexHolderTCB->uxPriority;
  1207. _25 = &pxReadyTasksLists[_24];
  1208. pxMutexHolderTCB->xStateListItem.pvContainer = _25;
  1209. _26 = pxMutexHolderTCB->uxPriority;
  1210. _27 = pxReadyTasksLists[_26].uxNumberOfItems;
  1211. _28 = _27 + 1;
  1212. pxReadyTasksLists[_26].uxNumberOfItems = _28;
  1213. goto <bb 12>; [INV]
  1214. <bb 11> :
  1215. pxCurrentTCB.115_29 = pxCurrentTCB;
  1216. _30 = pxCurrentTCB.115_29->uxPriority;
  1217. pxMutexHolderTCB->uxPriority = _30;
  1218. <bb 12> :
  1219. xReturn = 1;
  1220. goto <bb 15>; [INV]
  1221. <bb 13> :
  1222. _31 = pxMutexHolderTCB->uxBasePriority;
  1223. pxCurrentTCB.116_32 = pxCurrentTCB;
  1224. _33 = pxCurrentTCB.116_32->uxPriority;
  1225. if (_31 < _33)
  1226. goto <bb 14>; [INV]
  1227. else
  1228. goto <bb 15>; [INV]
  1229. <bb 14> :
  1230. xReturn = 1;
  1231. <bb 15> :
  1232. D.8042 = xReturn;
  1233. <bb 16> :
  1234. <L20>:
  1235. return D.8042;
  1236. }
  1237. xTaskGetSchedulerState ()
  1238. {
  1239. BaseType_t xReturn;
  1240. BaseType_t D.8020;
  1241. <bb 2> :
  1242. xSchedulerRunning.109_1 = xSchedulerRunning;
  1243. if (xSchedulerRunning.109_1 == 0)
  1244. goto <bb 3>; [INV]
  1245. else
  1246. goto <bb 4>; [INV]
  1247. <bb 3> :
  1248. xReturn = 1;
  1249. goto <bb 7>; [INV]
  1250. <bb 4> :
  1251. uxSchedulerSuspended.110_2 = uxSchedulerSuspended;
  1252. if (uxSchedulerSuspended.110_2 == 0)
  1253. goto <bb 5>; [INV]
  1254. else
  1255. goto <bb 6>; [INV]
  1256. <bb 5> :
  1257. xReturn = 2;
  1258. goto <bb 7>; [INV]
  1259. <bb 6> :
  1260. xReturn = 0;
  1261. <bb 7> :
  1262. D.8020 = xReturn;
  1263. <bb 8> :
  1264. <L6>:
  1265. return D.8020;
  1266. }
  1267. xTaskGetCurrentTaskHandle ()
  1268. {
  1269. struct tskTaskControlBlock * xReturn;
  1270. struct tskTaskControlBlock * D.8012;
  1271. <bb 2> :
  1272. xReturn = pxCurrentTCB;
  1273. D.8012 = xReturn;
  1274. <bb 3> :
  1275. <L0>:
  1276. return D.8012;
  1277. }
  1278. prvResetNextTaskUnblockTime ()
  1279. {
  1280. <bb 2> :
  1281. pxDelayedTaskList.107_1 = pxDelayedTaskList;
  1282. _2 = pxDelayedTaskList.107_1->uxNumberOfItems;
  1283. if (_2 == 0)
  1284. goto <bb 3>; [INV]
  1285. else
  1286. goto <bb 4>; [INV]
  1287. <bb 3> :
  1288. xNextTaskUnblockTime = 4294967295;
  1289. goto <bb 5>; [INV]
  1290. <bb 4> :
  1291. pxDelayedTaskList.108_3 = pxDelayedTaskList;
  1292. _4 = pxDelayedTaskList.108_3->xListEnd.pxNext;
  1293. _5 = _4->xItemValue;
  1294. xNextTaskUnblockTime = _5;
  1295. <bb 5> :
  1296. return;
  1297. }
  1298. prvDeleteTCB (struct TCB_t * pxTCB)
  1299. {
  1300. <bb 2> :
  1301. _1 = pxTCB->pxStack;
  1302. vPortFree (_1);
  1303. vPortFree (pxTCB);
  1304. return;
  1305. }
  1306. uxTaskGetStackHighWaterMark (struct tskTaskControlBlock * xTask)
  1307. {
  1308. UBaseType_t uxReturn;
  1309. uint8_t * pucEndOfStack;
  1310. struct TCB_t * pxTCB;
  1311. UBaseType_t D.8007;
  1312. struct TCB_t * iftmp.106;
  1313. <bb 2> :
  1314. if (xTask == 0B)
  1315. goto <bb 3>; [INV]
  1316. else
  1317. goto <bb 4>; [INV]
  1318. <bb 3> :
  1319. iftmp.106 = pxCurrentTCB;
  1320. goto <bb 5>; [INV]
  1321. <bb 4> :
  1322. iftmp.106 = xTask;
  1323. <bb 5> :
  1324. pxTCB = iftmp.106;
  1325. pucEndOfStack = pxTCB->pxStack;
  1326. _1 = prvTaskCheckFreeStackSpace (pucEndOfStack);
  1327. uxReturn = (UBaseType_t) _1;
  1328. D.8007 = uxReturn;
  1329. <bb 6> :
  1330. <L3>:
  1331. return D.8007;
  1332. }
  1333. prvTaskCheckFreeStackSpace (const uint8_t * pucStackByte)
  1334. {
  1335. uint32_t ulCount;
  1336. uint16_t D.8001;
  1337. <bb 2> :
  1338. ulCount = 0;
  1339. goto <bb 4>; [INV]
  1340. <bb 3> :
  1341. pucStackByte = pucStackByte + 1;
  1342. ulCount = ulCount + 1;
  1343. <bb 4> :
  1344. _1 = *pucStackByte;
  1345. if (_1 == 165)
  1346. goto <bb 3>; [INV]
  1347. else
  1348. goto <bb 5>; [INV]
  1349. <bb 5> :
  1350. ulCount = ulCount / 4;
  1351. D.8001 = (uint16_t) ulCount;
  1352. <bb 6> :
  1353. <L3>:
  1354. return D.8001;
  1355. }
  1356. prvListTasksWithinSingleList (struct TaskStatus_t * pxTaskStatusArray, struct List_t * pxList, eTaskState eState)
  1357. {
  1358. struct List_t * const pxConstList;
  1359. struct List_t * const pxConstList;
  1360. UBaseType_t uxTask;
  1361. struct TCB_t * pxFirstTCB;
  1362. struct TCB_t * pxNextTCB;
  1363. UBaseType_t D.7999;
  1364. <bb 2> :
  1365. uxTask = 0;
  1366. _1 = pxList->uxNumberOfItems;
  1367. if (_1 != 0)
  1368. goto <bb 3>; [INV]
  1369. else
  1370. goto <bb 9>; [INV]
  1371. <bb 3> :
  1372. pxConstList = pxList;
  1373. _2 = pxConstList->pxIndex;
  1374. _3 = _2->pxNext;
  1375. pxConstList->pxIndex = _3;
  1376. _4 = pxConstList->pxIndex;
  1377. _5 = &pxConstList->xListEnd;
  1378. if (_4 == _5)
  1379. goto <bb 4>; [INV]
  1380. else
  1381. goto <bb 5>; [INV]
  1382. <bb 4> :
  1383. _6 = pxConstList->pxIndex;
  1384. _7 = _6->pxNext;
  1385. pxConstList->pxIndex = _7;
  1386. <bb 5> :
  1387. _8 = pxConstList->pxIndex;
  1388. pxFirstTCB = _8->pvOwner;
  1389. <bb 6> :
  1390. pxConstList = pxList;
  1391. _9 = pxConstList->pxIndex;
  1392. _10 = _9->pxNext;
  1393. pxConstList->pxIndex = _10;
  1394. _11 = pxConstList->pxIndex;
  1395. _12 = &pxConstList->xListEnd;
  1396. if (_11 == _12)
  1397. goto <bb 7>; [INV]
  1398. else
  1399. goto <bb 8>; [INV]
  1400. <bb 7> :
  1401. _13 = pxConstList->pxIndex;
  1402. _14 = _13->pxNext;
  1403. pxConstList->pxIndex = _14;
  1404. <bb 8> :
  1405. _15 = pxConstList->pxIndex;
  1406. pxNextTCB = _15->pvOwner;
  1407. _16 = uxTask * 36;
  1408. _17 = pxTaskStatusArray + _16;
  1409. vTaskGetInfo (pxNextTCB, _17, 1, eState);
  1410. uxTask = uxTask + 1;
  1411. if (pxNextTCB != pxFirstTCB)
  1412. goto <bb 6>; [INV]
  1413. else
  1414. goto <bb 9>; [INV]
  1415. <bb 9> :
  1416. D.7999 = uxTask;
  1417. <bb 10> :
  1418. <L9>:
  1419. return D.7999;
  1420. }
  1421. vTaskGetInfo (struct tskTaskControlBlock * xTask, struct TaskStatus_t * pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState)
  1422. {
  1423. struct TCB_t * pxTCB;
  1424. struct TCB_t * iftmp.104;
  1425. <bb 2> :
  1426. if (xTask == 0B)
  1427. goto <bb 3>; [INV]
  1428. else
  1429. goto <bb 4>; [INV]
  1430. <bb 3> :
  1431. iftmp.104 = pxCurrentTCB;
  1432. goto <bb 5>; [INV]
  1433. <bb 4> :
  1434. iftmp.104 = xTask;
  1435. <bb 5> :
  1436. pxTCB = iftmp.104;
  1437. pxTaskStatus->xHandle = pxTCB;
  1438. _1 = &pxTCB->pcTaskName[0];
  1439. pxTaskStatus->pcTaskName = _1;
  1440. _2 = pxTCB->uxPriority;
  1441. pxTaskStatus->uxCurrentPriority = _2;
  1442. _3 = pxTCB->pxStack;
  1443. pxTaskStatus->pxStackBase = _3;
  1444. _4 = pxTCB->uxTCBNumber;
  1445. pxTaskStatus->xTaskNumber = _4;
  1446. _5 = pxTCB->uxBasePriority;
  1447. pxTaskStatus->uxBasePriority = _5;
  1448. pxTaskStatus->ulRunTimeCounter = 0;
  1449. if (eState != 5)
  1450. goto <bb 6>; [INV]
  1451. else
  1452. goto <bb 12>; [INV]
  1453. <bb 6> :
  1454. pxCurrentTCB.105_6 = pxCurrentTCB;
  1455. if (pxTCB == pxCurrentTCB.105_6)
  1456. goto <bb 7>; [INV]
  1457. else
  1458. goto <bb 8>; [INV]
  1459. <bb 7> :
  1460. pxTaskStatus->eCurrentState = 0;
  1461. goto <bb 13>; [INV]
  1462. <bb 8> :
  1463. pxTaskStatus->eCurrentState = eState;
  1464. if (eState == 3)
  1465. goto <bb 9>; [INV]
  1466. else
  1467. goto <bb 13>; [INV]
  1468. <bb 9> :
  1469. vTaskSuspendAll ();
  1470. _7 = pxTCB->xEventListItem.pvContainer;
  1471. if (_7 != 0B)
  1472. goto <bb 10>; [INV]
  1473. else
  1474. goto <bb 11>; [INV]
  1475. <bb 10> :
  1476. pxTaskStatus->eCurrentState = 2;
  1477. <bb 11> :
  1478. xTaskResumeAll ();
  1479. goto <bb 13>; [INV]
  1480. <bb 12> :
  1481. _8 = eTaskGetState (pxTCB);
  1482. pxTaskStatus->eCurrentState = _8;
  1483. <bb 13> :
  1484. if (xGetFreeStackSpace != 0)
  1485. goto <bb 14>; [INV]
  1486. else
  1487. goto <bb 15>; [INV]
  1488. <bb 14> :
  1489. _9 = pxTCB->pxStack;
  1490. _10 = prvTaskCheckFreeStackSpace (_9);
  1491. pxTaskStatus->usStackHighWaterMark = _10;
  1492. goto <bb 16>; [INV]
  1493. <bb 15> :
  1494. pxTaskStatus->usStackHighWaterMark = 0;
  1495. <bb 16> :
  1496. return;
  1497. }
  1498. prvCheckTasksWaitingTermination ()
  1499. {
  1500. struct TCB_t * pxTCB;
  1501. <bb 2> :
  1502. goto <bb 4>; [INV]
  1503. <bb 3> :
  1504. vPortEnterCritical ();
  1505. _1 = xTasksWaitingTermination.xListEnd.pxNext;
  1506. pxTCB = _1->pvOwner;
  1507. _2 = &pxTCB->xStateListItem;
  1508. uxListRemove (_2);
  1509. uxCurrentNumberOfTasks.101_3 = uxCurrentNumberOfTasks;
  1510. _4 = uxCurrentNumberOfTasks.101_3 + 4294967295;
  1511. uxCurrentNumberOfTasks = _4;
  1512. uxDeletedTasksWaitingCleanUp.102_5 = uxDeletedTasksWaitingCleanUp;
  1513. _6 = uxDeletedTasksWaitingCleanUp.102_5 + 4294967295;
  1514. uxDeletedTasksWaitingCleanUp = _6;
  1515. vPortExitCritical ();
  1516. prvDeleteTCB (pxTCB);
  1517. <bb 4> :
  1518. uxDeletedTasksWaitingCleanUp.103_7 = uxDeletedTasksWaitingCleanUp;
  1519. if (uxDeletedTasksWaitingCleanUp.103_7 != 0)
  1520. goto <bb 3>; [INV]
  1521. else
  1522. goto <bb 5>; [INV]
  1523. <bb 5> :
  1524. return;
  1525. }
  1526. prvInitialiseTaskLists ()
  1527. {
  1528. UBaseType_t uxPriority;
  1529. <bb 2> :
  1530. uxPriority = 0;
  1531. goto <bb 4>; [INV]
  1532. <bb 3> :
  1533. _1 = &pxReadyTasksLists[uxPriority];
  1534. vListInitialise (_1);
  1535. uxPriority = uxPriority + 1;
  1536. <bb 4> :
  1537. if (uxPriority <= 4)
  1538. goto <bb 3>; [INV]
  1539. else
  1540. goto <bb 5>; [INV]
  1541. <bb 5> :
  1542. vListInitialise (&xDelayedTaskList1);
  1543. vListInitialise (&xDelayedTaskList2);
  1544. vListInitialise (&xPendingReadyList);
  1545. vListInitialise (&xTasksWaitingTermination);
  1546. vListInitialise (&xSuspendedTaskList);
  1547. pxDelayedTaskList = &xDelayedTaskList1;
  1548. pxOverflowDelayedTaskList = &xDelayedTaskList2;
  1549. return;
  1550. }
  1551. prvIdleTask (void * pvParameters)
  1552. {
  1553. <bb 2> :
  1554. prvCheckTasksWaitingTermination ();
  1555. _1 = pxReadyTasksLists[0].uxNumberOfItems;
  1556. if (_1 > 1)
  1557. goto <bb 3>; [INV]
  1558. else
  1559. goto <bb 4>; [INV]
  1560. <bb 3> :
  1561. _2 = 3758157060B;
  1562. *_2 = 268435456;
  1563. __asm__ __volatile__("dsb" : : : "memory");
  1564. __asm__ __volatile__("isb");
  1565. <bb 4> :
  1566. goto <bb 2>; [INV]
  1567. }
  1568. vTaskSetTaskNumber (struct tskTaskControlBlock * xTask, const UBaseType_t uxHandle)
  1569. {
  1570. struct TCB_t * pxTCB;
  1571. <bb 2> :
  1572. if (xTask != 0B)
  1573. goto <bb 3>; [INV]
  1574. else
  1575. goto <bb 4>; [INV]
  1576. <bb 3> :
  1577. pxTCB = xTask;
  1578. pxTCB->uxTaskNumber = uxHandle;
  1579. <bb 4> :
  1580. return;
  1581. }
  1582. uxTaskGetTaskNumber (struct tskTaskControlBlock * xTask)
  1583. {
  1584. const struct TCB_t * pxTCB;
  1585. UBaseType_t uxReturn;
  1586. UBaseType_t D.7968;
  1587. <bb 2> :
  1588. if (xTask != 0B)
  1589. goto <bb 3>; [INV]
  1590. else
  1591. goto <bb 4>; [INV]
  1592. <bb 3> :
  1593. pxTCB = xTask;
  1594. uxReturn = pxTCB->uxTaskNumber;
  1595. goto <bb 5>; [INV]
  1596. <bb 4> :
  1597. uxReturn = 0;
  1598. <bb 5> :
  1599. D.7968 = uxReturn;
  1600. <bb 6> :
  1601. <L3>:
  1602. return D.7968;
  1603. }
  1604. vTaskMissedYield ()
  1605. {
  1606. <bb 2> :
  1607. xYieldPending = 1;
  1608. return;
  1609. }
  1610. xTaskCheckForTimeOut (struct TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait)
  1611. {
  1612. const TickType_t xElapsedTime;
  1613. const TickType_t xConstTickCount;
  1614. BaseType_t xReturn;
  1615. BaseType_t D.7963;
  1616. <bb 2> :
  1617. if (pxTimeOut == 0B)
  1618. goto <bb 3>; [INV]
  1619. else
  1620. goto <bb 5>; [INV]
  1621. <bb 3> :
  1622. vPortRaiseBASEPRI ();
  1623. <bb 4> :
  1624. goto <bb 4>; [INV]
  1625. <bb 5> :
  1626. if (pxTicksToWait == 0B)
  1627. goto <bb 6>; [INV]
  1628. else
  1629. goto <bb 8>; [INV]
  1630. <bb 6> :
  1631. vPortRaiseBASEPRI ();
  1632. <bb 7> :
  1633. goto <bb 7>; [INV]
  1634. <bb 8> :
  1635. vPortEnterCritical ();
  1636. xConstTickCount = xTickCount;
  1637. _1 = pxTimeOut->xTimeOnEntering;
  1638. xElapsedTime = xConstTickCount - _1;
  1639. pxCurrentTCB.98_2 = pxCurrentTCB;
  1640. _3 = pxCurrentTCB.98_2->ucDelayAborted;
  1641. if (_3 != 0)
  1642. goto <bb 9>; [INV]
  1643. else
  1644. goto <bb 10>; [INV]
  1645. <bb 9> :
  1646. pxCurrentTCB.99_4 = pxCurrentTCB;
  1647. pxCurrentTCB.99_4->ucDelayAborted = 0;
  1648. xReturn = 1;
  1649. goto <bb 18>; [INV]
  1650. <bb 10> :
  1651. _5 = *pxTicksToWait;
  1652. if (_5 == 4294967295)
  1653. goto <bb 11>; [INV]
  1654. else
  1655. goto <bb 12>; [INV]
  1656. <bb 11> :
  1657. xReturn = 0;
  1658. goto <bb 18>; [INV]
  1659. <bb 12> :
  1660. _6 = pxTimeOut->xOverflowCount;
  1661. xNumOfOverflows.100_7 = xNumOfOverflows;
  1662. if (_6 != xNumOfOverflows.100_7)
  1663. goto <bb 13>; [INV]
  1664. else
  1665. goto <bb 15>; [INV]
  1666. <bb 13> :
  1667. _8 = pxTimeOut->xTimeOnEntering;
  1668. if (xConstTickCount >= _8)
  1669. goto <bb 14>; [INV]
  1670. else
  1671. goto <bb 15>; [INV]
  1672. <bb 14> :
  1673. xReturn = 1;
  1674. *pxTicksToWait = 0;
  1675. goto <bb 18>; [INV]
  1676. <bb 15> :
  1677. _9 = *pxTicksToWait;
  1678. if (xElapsedTime < _9)
  1679. goto <bb 16>; [INV]
  1680. else
  1681. goto <bb 17>; [INV]
  1682. <bb 16> :
  1683. _10 = *pxTicksToWait;
  1684. _11 = _10 - xElapsedTime;
  1685. *pxTicksToWait = _11;
  1686. vTaskInternalSetTimeOutState (pxTimeOut);
  1687. xReturn = 0;
  1688. goto <bb 18>; [INV]
  1689. <bb 17> :
  1690. *pxTicksToWait = 0;
  1691. xReturn = 1;
  1692. <bb 18> :
  1693. vPortExitCritical ();
  1694. D.7963 = xReturn;
  1695. <bb 19> :
  1696. <L19>:
  1697. return D.7963;
  1698. }
  1699. vTaskInternalSetTimeOutState (struct TimeOut_t * const pxTimeOut)
  1700. {
  1701. <bb 2> :
  1702. xNumOfOverflows.96_1 = xNumOfOverflows;
  1703. pxTimeOut->xOverflowCount = xNumOfOverflows.96_1;
  1704. xTickCount.97_2 = xTickCount;
  1705. pxTimeOut->xTimeOnEntering = xTickCount.97_2;
  1706. return;
  1707. }
  1708. vTaskSetTimeOutState (struct TimeOut_t * const pxTimeOut)
  1709. {
  1710. <bb 2> :
  1711. if (pxTimeOut == 0B)
  1712. goto <bb 3>; [INV]
  1713. else
  1714. goto <bb 5>; [INV]
  1715. <bb 3> :
  1716. vPortRaiseBASEPRI ();
  1717. <bb 4> :
  1718. goto <bb 4>; [INV]
  1719. <bb 5> :
  1720. vPortEnterCritical ();
  1721. xNumOfOverflows.94_1 = xNumOfOverflows;
  1722. pxTimeOut->xOverflowCount = xNumOfOverflows.94_1;
  1723. xTickCount.95_2 = xTickCount;
  1724. pxTimeOut->xTimeOnEntering = xTickCount.95_2;
  1725. vPortExitCritical ();
  1726. return;
  1727. }
  1728. vTaskRemoveFromUnorderedEventList (struct ListItem_t * pxEventListItem, const TickType_t xItemValue)
  1729. {
  1730. struct ListItem_t * const pxIndex;
  1731. struct List_t * const pxList;
  1732. struct List_t * const pxList;
  1733. struct TCB_t * pxUnblockedTCB;
  1734. <bb 2> :
  1735. uxSchedulerSuspended.91_1 = uxSchedulerSuspended;
  1736. if (uxSchedulerSuspended.91_1 == 0)
  1737. goto <bb 3>; [INV]
  1738. else
  1739. goto <bb 5>; [INV]
  1740. <bb 3> :
  1741. vPortRaiseBASEPRI ();
  1742. <bb 4> :
  1743. goto <bb 4>; [INV]
  1744. <bb 5> :
  1745. _2 = xItemValue | 2147483648;
  1746. pxEventListItem->xItemValue = _2;
  1747. pxUnblockedTCB = pxEventListItem->pvOwner;
  1748. if (pxUnblockedTCB == 0B)
  1749. goto <bb 6>; [INV]
  1750. else
  1751. goto <bb 8>; [INV]
  1752. <bb 6> :
  1753. vPortRaiseBASEPRI ();
  1754. <bb 7> :
  1755. goto <bb 7>; [INV]
  1756. <bb 8> :
  1757. pxList = pxEventListItem->pvContainer;
  1758. _3 = pxEventListItem->pxNext;
  1759. _4 = pxEventListItem->pxPrevious;
  1760. _3->pxPrevious = _4;
  1761. _5 = pxEventListItem->pxPrevious;
  1762. _6 = pxEventListItem->pxNext;
  1763. _5->pxNext = _6;
  1764. _7 = pxList->pxIndex;
  1765. if (pxEventListItem == _7)
  1766. goto <bb 9>; [INV]
  1767. else
  1768. goto <bb 10>; [INV]
  1769. <bb 9> :
  1770. _8 = pxEventListItem->pxPrevious;
  1771. pxList->pxIndex = _8;
  1772. <bb 10> :
  1773. pxEventListItem->pvContainer = 0B;
  1774. _9 = pxList->uxNumberOfItems;
  1775. _10 = _9 + 4294967295;
  1776. pxList->uxNumberOfItems = _10;
  1777. pxList = pxUnblockedTCB->xStateListItem.pvContainer;
  1778. _11 = pxUnblockedTCB->xStateListItem.pxNext;
  1779. _12 = pxUnblockedTCB->xStateListItem.pxPrevious;
  1780. _11->pxPrevious = _12;
  1781. _13 = pxUnblockedTCB->xStateListItem.pxPrevious;
  1782. _14 = pxUnblockedTCB->xStateListItem.pxNext;
  1783. _13->pxNext = _14;
  1784. _15 = pxList->pxIndex;
  1785. _16 = &pxUnblockedTCB->xStateListItem;
  1786. if (_15 == _16)
  1787. goto <bb 11>; [INV]
  1788. else
  1789. goto <bb 12>; [INV]
  1790. <bb 11> :
  1791. _17 = pxUnblockedTCB->xStateListItem.pxPrevious;
  1792. pxList->pxIndex = _17;
  1793. <bb 12> :
  1794. pxUnblockedTCB->xStateListItem.pvContainer = 0B;
  1795. _18 = pxList->uxNumberOfItems;
  1796. _19 = _18 + 4294967295;
  1797. pxList->uxNumberOfItems = _19;
  1798. _20 = pxUnblockedTCB->uxPriority;
  1799. uxTopReadyPriority.92_21 = uxTopReadyPriority;
  1800. if (_20 > uxTopReadyPriority.92_21)
  1801. goto <bb 13>; [INV]
  1802. else
  1803. goto <bb 14>; [INV]
  1804. <bb 13> :
  1805. _22 = pxUnblockedTCB->uxPriority;
  1806. uxTopReadyPriority = _22;
  1807. <bb 14> :
  1808. _23 = pxUnblockedTCB->uxPriority;
  1809. pxIndex = pxReadyTasksLists[_23].pxIndex;
  1810. pxUnblockedTCB->xStateListItem.pxNext = pxIndex;
  1811. _24 = pxIndex->pxPrevious;
  1812. pxUnblockedTCB->xStateListItem.pxPrevious = _24;
  1813. _25 = pxIndex->pxPrevious;
  1814. _26 = &pxUnblockedTCB->xStateListItem;
  1815. _25->pxNext = _26;
  1816. _27 = &pxUnblockedTCB->xStateListItem;
  1817. pxIndex->pxPrevious = _27;
  1818. _28 = pxUnblockedTCB->uxPriority;
  1819. _29 = &pxReadyTasksLists[_28];
  1820. pxUnblockedTCB->xStateListItem.pvContainer = _29;
  1821. _30 = pxUnblockedTCB->uxPriority;
  1822. _31 = pxReadyTasksLists[_30].uxNumberOfItems;
  1823. _32 = _31 + 1;
  1824. pxReadyTasksLists[_30].uxNumberOfItems = _32;
  1825. _33 = pxUnblockedTCB->uxPriority;
  1826. pxCurrentTCB.93_34 = pxCurrentTCB;
  1827. _35 = pxCurrentTCB.93_34->uxPriority;
  1828. if (_33 > _35)
  1829. goto <bb 15>; [INV]
  1830. else
  1831. goto <bb 16>; [INV]
  1832. <bb 15> :
  1833. xYieldPending = 1;
  1834. <bb 16> :
  1835. return;
  1836. }
  1837. xTaskRemoveFromEventList (const struct List_t * const pxEventList)
  1838. {
  1839. struct ListItem_t * const pxIndex;
  1840. struct ListItem_t * const pxIndex;
  1841. struct List_t * const pxList;
  1842. struct List_t * const pxList;
  1843. BaseType_t xReturn;
  1844. struct TCB_t * pxUnblockedTCB;
  1845. BaseType_t D.7930;
  1846. <bb 2> :
  1847. _1 = pxEventList->xListEnd.pxNext;
  1848. pxUnblockedTCB = _1->pvOwner;
  1849. if (pxUnblockedTCB == 0B)
  1850. goto <bb 3>; [INV]
  1851. else
  1852. goto <bb 5>; [INV]
  1853. <bb 3> :
  1854. vPortRaiseBASEPRI ();
  1855. <bb 4> :
  1856. goto <bb 4>; [INV]
  1857. <bb 5> :
  1858. pxList = pxUnblockedTCB->xEventListItem.pvContainer;
  1859. _2 = pxUnblockedTCB->xEventListItem.pxNext;
  1860. _3 = pxUnblockedTCB->xEventListItem.pxPrevious;
  1861. _2->pxPrevious = _3;
  1862. _4 = pxUnblockedTCB->xEventListItem.pxPrevious;
  1863. _5 = pxUnblockedTCB->xEventListItem.pxNext;
  1864. _4->pxNext = _5;
  1865. _6 = pxList->pxIndex;
  1866. _7 = &pxUnblockedTCB->xEventListItem;
  1867. if (_6 == _7)
  1868. goto <bb 6>; [INV]
  1869. else
  1870. goto <bb 7>; [INV]
  1871. <bb 6> :
  1872. _8 = pxUnblockedTCB->xEventListItem.pxPrevious;
  1873. pxList->pxIndex = _8;
  1874. <bb 7> :
  1875. pxUnblockedTCB->xEventListItem.pvContainer = 0B;
  1876. _9 = pxList->uxNumberOfItems;
  1877. _10 = _9 + 4294967295;
  1878. pxList->uxNumberOfItems = _10;
  1879. uxSchedulerSuspended.88_11 = uxSchedulerSuspended;
  1880. if (uxSchedulerSuspended.88_11 == 0)
  1881. goto <bb 8>; [INV]
  1882. else
  1883. goto <bb 13>; [INV]
  1884. <bb 8> :
  1885. pxList = pxUnblockedTCB->xStateListItem.pvContainer;
  1886. _12 = pxUnblockedTCB->xStateListItem.pxNext;
  1887. _13 = pxUnblockedTCB->xStateListItem.pxPrevious;
  1888. _12->pxPrevious = _13;
  1889. _14 = pxUnblockedTCB->xStateListItem.pxPrevious;
  1890. _15 = pxUnblockedTCB->xStateListItem.pxNext;
  1891. _14->pxNext = _15;
  1892. _16 = pxList->pxIndex;
  1893. _17 = &pxUnblockedTCB->xStateListItem;
  1894. if (_16 == _17)
  1895. goto <bb 9>; [INV]
  1896. else
  1897. goto <bb 10>; [INV]
  1898. <bb 9> :
  1899. _18 = pxUnblockedTCB->xStateListItem.pxPrevious;
  1900. pxList->pxIndex = _18;
  1901. <bb 10> :
  1902. pxUnblockedTCB->xStateListItem.pvContainer = 0B;
  1903. _19 = pxList->uxNumberOfItems;
  1904. _20 = _19 + 4294967295;
  1905. pxList->uxNumberOfItems = _20;
  1906. _21 = pxUnblockedTCB->uxPriority;
  1907. uxTopReadyPriority.89_22 = uxTopReadyPriority;
  1908. if (_21 > uxTopReadyPriority.89_22)
  1909. goto <bb 11>; [INV]
  1910. else
  1911. goto <bb 12>; [INV]
  1912. <bb 11> :
  1913. _23 = pxUnblockedTCB->uxPriority;
  1914. uxTopReadyPriority = _23;
  1915. <bb 12> :
  1916. _24 = pxUnblockedTCB->uxPriority;
  1917. pxIndex = pxReadyTasksLists[_24].pxIndex;
  1918. pxUnblockedTCB->xStateListItem.pxNext = pxIndex;
  1919. _25 = pxIndex->pxPrevious;
  1920. pxUnblockedTCB->xStateListItem.pxPrevious = _25;
  1921. _26 = pxIndex->pxPrevious;
  1922. _27 = &pxUnblockedTCB->xStateListItem;
  1923. _26->pxNext = _27;
  1924. _28 = &pxUnblockedTCB->xStateListItem;
  1925. pxIndex->pxPrevious = _28;
  1926. _29 = pxUnblockedTCB->uxPriority;
  1927. _30 = &pxReadyTasksLists[_29];
  1928. pxUnblockedTCB->xStateListItem.pvContainer = _30;
  1929. _31 = pxUnblockedTCB->uxPriority;
  1930. _32 = pxReadyTasksLists[_31].uxNumberOfItems;
  1931. _33 = _32 + 1;
  1932. pxReadyTasksLists[_31].uxNumberOfItems = _33;
  1933. goto <bb 14>; [INV]
  1934. <bb 13> :
  1935. pxIndex = xPendingReadyList.pxIndex;
  1936. pxUnblockedTCB->xEventListItem.pxNext = pxIndex;
  1937. _34 = pxIndex->pxPrevious;
  1938. pxUnblockedTCB->xEventListItem.pxPrevious = _34;
  1939. _35 = pxIndex->pxPrevious;
  1940. _36 = &pxUnblockedTCB->xEventListItem;
  1941. _35->pxNext = _36;
  1942. _37 = &pxUnblockedTCB->xEventListItem;
  1943. pxIndex->pxPrevious = _37;
  1944. pxUnblockedTCB->xEventListItem.pvContainer = &xPendingReadyList;
  1945. _38 = xPendingReadyList.uxNumberOfItems;
  1946. _39 = _38 + 1;
  1947. xPendingReadyList.uxNumberOfItems = _39;
  1948. <bb 14> :
  1949. _40 = pxUnblockedTCB->uxPriority;
  1950. pxCurrentTCB.90_41 = pxCurrentTCB;
  1951. _42 = pxCurrentTCB.90_41->uxPriority;
  1952. if (_40 > _42)
  1953. goto <bb 15>; [INV]
  1954. else
  1955. goto <bb 16>; [INV]
  1956. <bb 15> :
  1957. xReturn = 1;
  1958. xYieldPending = 1;
  1959. goto <bb 17>; [INV]
  1960. <bb 16> :
  1961. xReturn = 0;
  1962. <bb 17> :
  1963. D.7930 = xReturn;
  1964. <bb 18> :
  1965. <L15>:
  1966. return D.7930;
  1967. }
  1968. vTaskPlaceOnEventListRestricted (struct List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely)
  1969. {
  1970. struct ListItem_t * const pxIndex;
  1971. <bb 2> :
  1972. if (pxEventList == 0B)
  1973. goto <bb 3>; [INV]
  1974. else
  1975. goto <bb 5>; [INV]
  1976. <bb 3> :
  1977. vPortRaiseBASEPRI ();
  1978. <bb 4> :
  1979. goto <bb 4>; [INV]
  1980. <bb 5> :
  1981. pxIndex = pxEventList->pxIndex;
  1982. pxCurrentTCB.83_1 = pxCurrentTCB;
  1983. pxCurrentTCB.83_1->xEventListItem.pxNext = pxIndex;
  1984. pxCurrentTCB.84_2 = pxCurrentTCB;
  1985. _3 = pxIndex->pxPrevious;
  1986. pxCurrentTCB.84_2->xEventListItem.pxPrevious = _3;
  1987. pxCurrentTCB.85_4 = pxCurrentTCB;
  1988. _5 = pxIndex->pxPrevious;
  1989. _6 = &pxCurrentTCB.85_4->xEventListItem;
  1990. _5->pxNext = _6;
  1991. pxCurrentTCB.86_7 = pxCurrentTCB;
  1992. _8 = &pxCurrentTCB.86_7->xEventListItem;
  1993. pxIndex->pxPrevious = _8;
  1994. pxCurrentTCB.87_9 = pxCurrentTCB;
  1995. pxCurrentTCB.87_9->xEventListItem.pvContainer = pxEventList;
  1996. _10 = pxEventList->uxNumberOfItems;
  1997. _11 = _10 + 1;
  1998. pxEventList->uxNumberOfItems = _11;
  1999. if (xWaitIndefinitely != 0)
  2000. goto <bb 6>; [INV]
  2001. else
  2002. goto <bb 7>; [INV]
  2003. <bb 6> :
  2004. xTicksToWait = 4294967295;
  2005. <bb 7> :
  2006. prvAddCurrentTaskToDelayedList (xTicksToWait, xWaitIndefinitely);
  2007. return;
  2008. }
  2009. vTaskPlaceOnUnorderedEventList (struct List_t * pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait)
  2010. {
  2011. struct ListItem_t * const pxIndex;
  2012. <bb 2> :
  2013. if (pxEventList == 0B)
  2014. goto <bb 3>; [INV]
  2015. else
  2016. goto <bb 5>; [INV]
  2017. <bb 3> :
  2018. vPortRaiseBASEPRI ();
  2019. <bb 4> :
  2020. goto <bb 4>; [INV]
  2021. <bb 5> :
  2022. uxSchedulerSuspended.76_1 = uxSchedulerSuspended;
  2023. if (uxSchedulerSuspended.76_1 == 0)
  2024. goto <bb 6>; [INV]
  2025. else
  2026. goto <bb 8>; [INV]
  2027. <bb 6> :
  2028. vPortRaiseBASEPRI ();
  2029. <bb 7> :
  2030. goto <bb 7>; [INV]
  2031. <bb 8> :
  2032. pxCurrentTCB.77_2 = pxCurrentTCB;
  2033. _3 = xItemValue | 2147483648;
  2034. pxCurrentTCB.77_2->xEventListItem.xItemValue = _3;
  2035. pxIndex = pxEventList->pxIndex;
  2036. pxCurrentTCB.78_4 = pxCurrentTCB;
  2037. pxCurrentTCB.78_4->xEventListItem.pxNext = pxIndex;
  2038. pxCurrentTCB.79_5 = pxCurrentTCB;
  2039. _6 = pxIndex->pxPrevious;
  2040. pxCurrentTCB.79_5->xEventListItem.pxPrevious = _6;
  2041. pxCurrentTCB.80_7 = pxCurrentTCB;
  2042. _8 = pxIndex->pxPrevious;
  2043. _9 = &pxCurrentTCB.80_7->xEventListItem;
  2044. _8->pxNext = _9;
  2045. pxCurrentTCB.81_10 = pxCurrentTCB;
  2046. _11 = &pxCurrentTCB.81_10->xEventListItem;
  2047. pxIndex->pxPrevious = _11;
  2048. pxCurrentTCB.82_12 = pxCurrentTCB;
  2049. pxCurrentTCB.82_12->xEventListItem.pvContainer = pxEventList;
  2050. _13 = pxEventList->uxNumberOfItems;
  2051. _14 = _13 + 1;
  2052. pxEventList->uxNumberOfItems = _14;
  2053. prvAddCurrentTaskToDelayedList (xTicksToWait, 1);
  2054. return;
  2055. }
  2056. vTaskPlaceOnEventList (struct List_t * const pxEventList, const TickType_t xTicksToWait)
  2057. {
  2058. <bb 2> :
  2059. if (pxEventList == 0B)
  2060. goto <bb 3>; [INV]
  2061. else
  2062. goto <bb 5>; [INV]
  2063. <bb 3> :
  2064. vPortRaiseBASEPRI ();
  2065. <bb 4> :
  2066. goto <bb 4>; [INV]
  2067. <bb 5> :
  2068. pxCurrentTCB.75_1 = pxCurrentTCB;
  2069. _2 = &pxCurrentTCB.75_1->xEventListItem;
  2070. vListInsert (pxEventList, _2);
  2071. prvAddCurrentTaskToDelayedList (xTicksToWait, 1);
  2072. return;
  2073. }
  2074. __attribute__((used))
  2075. vTaskSwitchContext ()
  2076. {
  2077. struct List_t * const pxConstList;
  2078. UBaseType_t uxTopPriority;
  2079. <bb 2> :
  2080. uxSchedulerSuspended.74_1 = uxSchedulerSuspended;
  2081. if (uxSchedulerSuspended.74_1 != 0)
  2082. goto <bb 3>; [INV]
  2083. else
  2084. goto <bb 4>; [INV]
  2085. <bb 3> :
  2086. xYieldPending = 1;
  2087. goto <bb 13>; [INV]
  2088. <bb 4> :
  2089. xYieldPending = 0;
  2090. uxTopPriority = uxTopReadyPriority;
  2091. goto <bb 9>; [INV]
  2092. <bb 5> :
  2093. if (uxTopPriority == 0)
  2094. goto <bb 6>; [INV]
  2095. else
  2096. goto <bb 8>; [INV]
  2097. <bb 6> :
  2098. vPortRaiseBASEPRI ();
  2099. <bb 7> :
  2100. goto <bb 7>; [INV]
  2101. <bb 8> :
  2102. uxTopPriority = uxTopPriority + 4294967295;
  2103. <bb 9> :
  2104. _2 = pxReadyTasksLists[uxTopPriority].uxNumberOfItems;
  2105. if (_2 == 0)
  2106. goto <bb 5>; [INV]
  2107. else
  2108. goto <bb 10>; [INV]
  2109. <bb 10> :
  2110. pxConstList = &pxReadyTasksLists[uxTopPriority];
  2111. _3 = pxConstList->pxIndex;
  2112. _4 = _3->pxNext;
  2113. pxConstList->pxIndex = _4;
  2114. _5 = pxConstList->pxIndex;
  2115. _6 = &pxConstList->xListEnd;
  2116. if (_5 == _6)
  2117. goto <bb 11>; [INV]
  2118. else
  2119. goto <bb 12>; [INV]
  2120. <bb 11> :
  2121. _7 = pxConstList->pxIndex;
  2122. _8 = _7->pxNext;
  2123. pxConstList->pxIndex = _8;
  2124. <bb 12> :
  2125. _9 = pxConstList->pxIndex;
  2126. _10 = _9->pvOwner;
  2127. pxCurrentTCB = _10;
  2128. uxTopReadyPriority = uxTopPriority;
  2129. <bb 13> :
  2130. return;
  2131. }
  2132. xTaskIncrementTick ()
  2133. {
  2134. struct ListItem_t * const pxIndex;
  2135. struct List_t * const pxList;
  2136. struct List_t * const pxList;
  2137. struct List_t * pxTemp;
  2138. const TickType_t xConstTickCount;
  2139. BaseType_t xSwitchRequired;
  2140. TickType_t xItemValue;
  2141. struct TCB_t * pxTCB;
  2142. BaseType_t D.7897;
  2143. <bb 2> :
  2144. xSwitchRequired = 0;
  2145. uxSchedulerSuspended.61_1 = uxSchedulerSuspended;
  2146. if (uxSchedulerSuspended.61_1 == 0)
  2147. goto <bb 3>; [INV]
  2148. else
  2149. goto <bb 28>; [INV]
  2150. <bb 3> :
  2151. xTickCount.62_2 = xTickCount;
  2152. xConstTickCount = xTickCount.62_2 + 1;
  2153. xTickCount = xConstTickCount;
  2154. if (xConstTickCount == 0)
  2155. goto <bb 4>; [INV]
  2156. else
  2157. goto <bb 8>; [INV]
  2158. <bb 4> :
  2159. pxDelayedTaskList.63_3 = pxDelayedTaskList;
  2160. _4 = pxDelayedTaskList.63_3->uxNumberOfItems;
  2161. if (_4 != 0)
  2162. goto <bb 5>; [INV]
  2163. else
  2164. goto <bb 7>; [INV]
  2165. <bb 5> :
  2166. vPortRaiseBASEPRI ();
  2167. <bb 6> :
  2168. goto <bb 6>; [INV]
  2169. <bb 7> :
  2170. pxTemp = pxDelayedTaskList;
  2171. pxOverflowDelayedTaskList.64_5 = pxOverflowDelayedTaskList;
  2172. pxDelayedTaskList = pxOverflowDelayedTaskList.64_5;
  2173. pxOverflowDelayedTaskList = pxTemp;
  2174. xNumOfOverflows.65_6 = xNumOfOverflows;
  2175. _7 = xNumOfOverflows.65_6 + 1;
  2176. xNumOfOverflows = _7;
  2177. prvResetNextTaskUnblockTime ();
  2178. <bb 8> :
  2179. xNextTaskUnblockTime.66_8 = xNextTaskUnblockTime;
  2180. if (xConstTickCount >= xNextTaskUnblockTime.66_8)
  2181. goto <bb 9>; [INV]
  2182. else
  2183. goto <bb 24>; [INV]
  2184. <bb 9> :
  2185. pxDelayedTaskList.67_9 = pxDelayedTaskList;
  2186. _10 = pxDelayedTaskList.67_9->uxNumberOfItems;
  2187. if (_10 == 0)
  2188. goto <bb 10>; [INV]
  2189. else
  2190. goto <bb 11>; [INV]
  2191. <bb 10> :
  2192. xNextTaskUnblockTime = 4294967295;
  2193. goto <bb 24>; [INV]
  2194. <bb 11> :
  2195. pxDelayedTaskList.68_11 = pxDelayedTaskList;
  2196. _12 = pxDelayedTaskList.68_11->xListEnd.pxNext;
  2197. pxTCB = _12->pvOwner;
  2198. xItemValue = pxTCB->xStateListItem.xItemValue;
  2199. if (xConstTickCount < xItemValue)
  2200. goto <bb 12>; [INV]
  2201. else
  2202. goto <bb 13>; [INV]
  2203. <bb 12> :
  2204. xNextTaskUnblockTime = xItemValue;
  2205. goto <bb 24>; [INV]
  2206. <bb 13> :
  2207. pxList = pxTCB->xStateListItem.pvContainer;
  2208. _13 = pxTCB->xStateListItem.pxNext;
  2209. _14 = pxTCB->xStateListItem.pxPrevious;
  2210. _13->pxPrevious = _14;
  2211. _15 = pxTCB->xStateListItem.pxPrevious;
  2212. _16 = pxTCB->xStateListItem.pxNext;
  2213. _15->pxNext = _16;
  2214. _17 = pxList->pxIndex;
  2215. _18 = &pxTCB->xStateListItem;
  2216. if (_17 == _18)
  2217. goto <bb 14>; [INV]
  2218. else
  2219. goto <bb 15>; [INV]
  2220. <bb 14> :
  2221. _19 = pxTCB->xStateListItem.pxPrevious;
  2222. pxList->pxIndex = _19;
  2223. <bb 15> :
  2224. pxTCB->xStateListItem.pvContainer = 0B;
  2225. _20 = pxList->uxNumberOfItems;
  2226. _21 = _20 + 4294967295;
  2227. pxList->uxNumberOfItems = _21;
  2228. _22 = pxTCB->xEventListItem.pvContainer;
  2229. if (_22 != 0B)
  2230. goto <bb 16>; [INV]
  2231. else
  2232. goto <bb 19>; [INV]
  2233. <bb 16> :
  2234. pxList = pxTCB->xEventListItem.pvContainer;
  2235. _23 = pxTCB->xEventListItem.pxNext;
  2236. _24 = pxTCB->xEventListItem.pxPrevious;
  2237. _23->pxPrevious = _24;
  2238. _25 = pxTCB->xEventListItem.pxPrevious;
  2239. _26 = pxTCB->xEventListItem.pxNext;
  2240. _25->pxNext = _26;
  2241. _27 = pxList->pxIndex;
  2242. _28 = &pxTCB->xEventListItem;
  2243. if (_27 == _28)
  2244. goto <bb 17>; [INV]
  2245. else
  2246. goto <bb 18>; [INV]
  2247. <bb 17> :
  2248. _29 = pxTCB->xEventListItem.pxPrevious;
  2249. pxList->pxIndex = _29;
  2250. <bb 18> :
  2251. pxTCB->xEventListItem.pvContainer = 0B;
  2252. _30 = pxList->uxNumberOfItems;
  2253. _31 = _30 + 4294967295;
  2254. pxList->uxNumberOfItems = _31;
  2255. <bb 19> :
  2256. _32 = pxTCB->uxPriority;
  2257. uxTopReadyPriority.69_33 = uxTopReadyPriority;
  2258. if (_32 > uxTopReadyPriority.69_33)
  2259. goto <bb 20>; [INV]
  2260. else
  2261. goto <bb 21>; [INV]
  2262. <bb 20> :
  2263. _34 = pxTCB->uxPriority;
  2264. uxTopReadyPriority = _34;
  2265. <bb 21> :
  2266. _35 = pxTCB->uxPriority;
  2267. pxIndex = pxReadyTasksLists[_35].pxIndex;
  2268. pxTCB->xStateListItem.pxNext = pxIndex;
  2269. _36 = pxIndex->pxPrevious;
  2270. pxTCB->xStateListItem.pxPrevious = _36;
  2271. _37 = pxIndex->pxPrevious;
  2272. _38 = &pxTCB->xStateListItem;
  2273. _37->pxNext = _38;
  2274. _39 = &pxTCB->xStateListItem;
  2275. pxIndex->pxPrevious = _39;
  2276. _40 = pxTCB->uxPriority;
  2277. _41 = &pxReadyTasksLists[_40];
  2278. pxTCB->xStateListItem.pvContainer = _41;
  2279. _42 = pxTCB->uxPriority;
  2280. _43 = pxReadyTasksLists[_42].uxNumberOfItems;
  2281. _44 = _43 + 1;
  2282. pxReadyTasksLists[_42].uxNumberOfItems = _44;
  2283. _45 = pxTCB->uxPriority;
  2284. pxCurrentTCB.70_46 = pxCurrentTCB;
  2285. _47 = pxCurrentTCB.70_46->uxPriority;
  2286. if (_45 >= _47)
  2287. goto <bb 22>; [INV]
  2288. else
  2289. goto <bb 23>; [INV]
  2290. <bb 22> :
  2291. xSwitchRequired = 1;
  2292. <bb 23> :
  2293. goto <bb 9>; [INV]
  2294. <bb 24> :
  2295. pxCurrentTCB.71_48 = pxCurrentTCB;
  2296. _49 = pxCurrentTCB.71_48->uxPriority;
  2297. _50 = pxReadyTasksLists[_49].uxNumberOfItems;
  2298. if (_50 > 1)
  2299. goto <bb 25>; [INV]
  2300. else
  2301. goto <bb 26>; [INV]
  2302. <bb 25> :
  2303. xSwitchRequired = 1;
  2304. <bb 26> :
  2305. xYieldPending.72_51 = xYieldPending;
  2306. if (xYieldPending.72_51 != 0)
  2307. goto <bb 27>; [INV]
  2308. else
  2309. goto <bb 29>; [INV]
  2310. <bb 27> :
  2311. xSwitchRequired = 1;
  2312. goto <bb 29>; [INV]
  2313. <bb 28> :
  2314. xPendedTicks.73_52 = xPendedTicks;
  2315. _53 = xPendedTicks.73_52 + 1;
  2316. xPendedTicks = _53;
  2317. <bb 29> :
  2318. D.7897 = xSwitchRequired;
  2319. <bb 30> :
  2320. <L35>:
  2321. return D.7897;
  2322. }
  2323. xTaskAbortDelay (struct tskTaskControlBlock * xTask)
  2324. {
  2325. struct ListItem_t * const pxIndex;
  2326. BaseType_t xReturn;
  2327. struct TCB_t * pxTCB;
  2328. BaseType_t D.7863;
  2329. <bb 2> :
  2330. pxTCB = xTask;
  2331. if (pxTCB == 0B)
  2332. goto <bb 3>; [INV]
  2333. else
  2334. goto <bb 5>; [INV]
  2335. <bb 3> :
  2336. vPortRaiseBASEPRI ();
  2337. <bb 4> :
  2338. goto <bb 4>; [INV]
  2339. <bb 5> :
  2340. vTaskSuspendAll ();
  2341. _1 = eTaskGetState (xTask);
  2342. if (_1 == 2)
  2343. goto <bb 6>; [INV]
  2344. else
  2345. goto <bb 12>; [INV]
  2346. <bb 6> :
  2347. xReturn = 1;
  2348. _2 = &pxTCB->xStateListItem;
  2349. uxListRemove (_2);
  2350. vPortEnterCritical ();
  2351. _3 = pxTCB->xEventListItem.pvContainer;
  2352. if (_3 != 0B)
  2353. goto <bb 7>; [INV]
  2354. else
  2355. goto <bb 8>; [INV]
  2356. <bb 7> :
  2357. _4 = &pxTCB->xEventListItem;
  2358. uxListRemove (_4);
  2359. pxTCB->ucDelayAborted = 1;
  2360. <bb 8> :
  2361. vPortExitCritical ();
  2362. _5 = pxTCB->uxPriority;
  2363. uxTopReadyPriority.59_6 = uxTopReadyPriority;
  2364. if (_5 > uxTopReadyPriority.59_6)
  2365. goto <bb 9>; [INV]
  2366. else
  2367. goto <bb 10>; [INV]
  2368. <bb 9> :
  2369. _7 = pxTCB->uxPriority;
  2370. uxTopReadyPriority = _7;
  2371. <bb 10> :
  2372. _8 = pxTCB->uxPriority;
  2373. pxIndex = pxReadyTasksLists[_8].pxIndex;
  2374. pxTCB->xStateListItem.pxNext = pxIndex;
  2375. _9 = pxIndex->pxPrevious;
  2376. pxTCB->xStateListItem.pxPrevious = _9;
  2377. _10 = pxIndex->pxPrevious;
  2378. _11 = &pxTCB->xStateListItem;
  2379. _10->pxNext = _11;
  2380. _12 = &pxTCB->xStateListItem;
  2381. pxIndex->pxPrevious = _12;
  2382. _13 = pxTCB->uxPriority;
  2383. _14 = &pxReadyTasksLists[_13];
  2384. pxTCB->xStateListItem.pvContainer = _14;
  2385. _15 = pxTCB->uxPriority;
  2386. _16 = pxReadyTasksLists[_15].uxNumberOfItems;
  2387. _17 = _16 + 1;
  2388. pxReadyTasksLists[_15].uxNumberOfItems = _17;
  2389. _18 = pxTCB->uxPriority;
  2390. pxCurrentTCB.60_19 = pxCurrentTCB;
  2391. _20 = pxCurrentTCB.60_19->uxPriority;
  2392. if (_18 > _20)
  2393. goto <bb 11>; [INV]
  2394. else
  2395. goto <bb 13>; [INV]
  2396. <bb 11> :
  2397. xYieldPending = 1;
  2398. goto <bb 13>; [INV]
  2399. <bb 12> :
  2400. xReturn = 0;
  2401. <bb 13> :
  2402. xTaskResumeAll ();
  2403. D.7863 = xReturn;
  2404. <bb 14> :
  2405. <L14>:
  2406. return D.7863;
  2407. }
  2408. xTaskCatchUpTicks (TickType_t xTicksToCatchUp)
  2409. {
  2410. BaseType_t xYieldOccurred;
  2411. BaseType_t D.7848;
  2412. <bb 2> :
  2413. uxSchedulerSuspended.57_1 = uxSchedulerSuspended;
  2414. if (uxSchedulerSuspended.57_1 != 0)
  2415. goto <bb 3>; [INV]
  2416. else
  2417. goto <bb 5>; [INV]
  2418. <bb 3> :
  2419. vPortRaiseBASEPRI ();
  2420. <bb 4> :
  2421. goto <bb 4>; [INV]
  2422. <bb 5> :
  2423. vTaskSuspendAll ();
  2424. xPendedTicks.58_2 = xPendedTicks;
  2425. _3 = xTicksToCatchUp + xPendedTicks.58_2;
  2426. xPendedTicks = _3;
  2427. xYieldOccurred = xTaskResumeAll ();
  2428. D.7848 = xYieldOccurred;
  2429. <bb 6> :
  2430. <L3>:
  2431. return D.7848;
  2432. }
  2433. uxTaskGetSystemState (struct TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime)
  2434. {
  2435. UBaseType_t uxQueue;
  2436. UBaseType_t uxTask;
  2437. UBaseType_t D.7844;
  2438. long unsigned int D.7840;
  2439. long unsigned int D.7839;
  2440. long unsigned int D.7838;
  2441. long unsigned int D.7837;
  2442. long unsigned int D.7836;
  2443. <bb 2> :
  2444. uxTask = 0;
  2445. uxQueue = 5;
  2446. vTaskSuspendAll ();
  2447. uxCurrentNumberOfTasks.54_1 = uxCurrentNumberOfTasks;
  2448. if (uxArraySize >= uxCurrentNumberOfTasks.54_1)
  2449. goto <bb 3>; [INV]
  2450. else
  2451. goto <bb 6>; [INV]
  2452. <bb 3> :
  2453. uxQueue = uxQueue + 4294967295;
  2454. _2 = uxTask * 36;
  2455. _3 = pxTaskStatusArray + _2;
  2456. _4 = &pxReadyTasksLists[uxQueue];
  2457. D.7836 = prvListTasksWithinSingleList (_3, _4, 1);
  2458. uxTask = D.7836 + uxTask;
  2459. if (uxQueue != 0)
  2460. goto <bb 3>; [INV]
  2461. else
  2462. goto <bb 4>; [INV]
  2463. <bb 4> :
  2464. _5 = uxTask * 36;
  2465. _6 = pxTaskStatusArray + _5;
  2466. pxDelayedTaskList.55_7 = pxDelayedTaskList;
  2467. D.7837 = prvListTasksWithinSingleList (_6, pxDelayedTaskList.55_7, 2);
  2468. uxTask = D.7837 + uxTask;
  2469. _8 = uxTask * 36;
  2470. _9 = pxTaskStatusArray + _8;
  2471. pxOverflowDelayedTaskList.56_10 = pxOverflowDelayedTaskList;
  2472. D.7838 = prvListTasksWithinSingleList (_9, pxOverflowDelayedTaskList.56_10, 2);
  2473. uxTask = D.7838 + uxTask;
  2474. _11 = uxTask * 36;
  2475. _12 = pxTaskStatusArray + _11;
  2476. D.7839 = prvListTasksWithinSingleList (_12, &xTasksWaitingTermination, 4);
  2477. uxTask = D.7839 + uxTask;
  2478. _13 = uxTask * 36;
  2479. _14 = pxTaskStatusArray + _13;
  2480. D.7840 = prvListTasksWithinSingleList (_14, &xSuspendedTaskList, 3);
  2481. uxTask = D.7840 + uxTask;
  2482. if (pulTotalRunTime != 0B)
  2483. goto <bb 5>; [INV]
  2484. else
  2485. goto <bb 6>; [INV]
  2486. <bb 5> :
  2487. *pulTotalRunTime = 0;
  2488. <bb 6> :
  2489. xTaskResumeAll ();
  2490. D.7844 = uxTask;
  2491. <bb 7> :
  2492. <L7>:
  2493. return D.7844;
  2494. }
  2495. xTaskGetHandle (const char * pcNameToQuery)
  2496. {
  2497. struct TCB_t * pxTCB;
  2498. UBaseType_t uxQueue;
  2499. struct tskTaskControlBlock * D.7832;
  2500. <bb 2> :
  2501. uxQueue = 5;
  2502. _1 = strlen (pcNameToQuery);
  2503. if (_1 > 9)
  2504. goto <bb 3>; [INV]
  2505. else
  2506. goto <bb 5>; [INV]
  2507. <bb 3> :
  2508. vPortRaiseBASEPRI ();
  2509. <bb 4> :
  2510. goto <bb 4>; [INV]
  2511. <bb 5> :
  2512. vTaskSuspendAll ();
  2513. <bb 6> :
  2514. uxQueue = uxQueue + 4294967295;
  2515. _2 = &pxReadyTasksLists[uxQueue];
  2516. pxTCB = prvSearchForNameWithinSingleList (_2, pcNameToQuery);
  2517. if (pxTCB != 0B)
  2518. goto <bb 7>; [INV]
  2519. else
  2520. goto <bb 8>; [INV]
  2521. <bb 7> :
  2522. goto <bb 9>; [INV]
  2523. <bb 8> :
  2524. if (uxQueue != 0)
  2525. goto <bb 6>; [INV]
  2526. else
  2527. goto <bb 9>; [INV]
  2528. <bb 9> :
  2529. if (pxTCB == 0B)
  2530. goto <bb 10>; [INV]
  2531. else
  2532. goto <bb 11>; [INV]
  2533. <bb 10> :
  2534. pxDelayedTaskList.52_3 = pxDelayedTaskList;
  2535. pxTCB = prvSearchForNameWithinSingleList (pxDelayedTaskList.52_3, pcNameToQuery);
  2536. <bb 11> :
  2537. if (pxTCB == 0B)
  2538. goto <bb 12>; [INV]
  2539. else
  2540. goto <bb 13>; [INV]
  2541. <bb 12> :
  2542. pxOverflowDelayedTaskList.53_4 = pxOverflowDelayedTaskList;
  2543. pxTCB = prvSearchForNameWithinSingleList (pxOverflowDelayedTaskList.53_4, pcNameToQuery);
  2544. <bb 13> :
  2545. if (pxTCB == 0B)
  2546. goto <bb 14>; [INV]
  2547. else
  2548. goto <bb 15>; [INV]
  2549. <bb 14> :
  2550. pxTCB = prvSearchForNameWithinSingleList (&xSuspendedTaskList, pcNameToQuery);
  2551. <bb 15> :
  2552. if (pxTCB == 0B)
  2553. goto <bb 16>; [INV]
  2554. else
  2555. goto <bb 17>; [INV]
  2556. <bb 16> :
  2557. pxTCB = prvSearchForNameWithinSingleList (&xTasksWaitingTermination, pcNameToQuery);
  2558. <bb 17> :
  2559. xTaskResumeAll ();
  2560. D.7832 = pxTCB;
  2561. <bb 18> :
  2562. <L15>:
  2563. return D.7832;
  2564. }
  2565. prvSearchForNameWithinSingleList (struct List_t * pxList, const char * pcNameToQuery)
  2566. {
  2567. struct List_t * const pxConstList;
  2568. struct List_t * const pxConstList;
  2569. BaseType_t xBreakLoop;
  2570. char cNextChar;
  2571. UBaseType_t x;
  2572. struct TCB_t * pxReturn;
  2573. struct TCB_t * pxFirstTCB;
  2574. struct TCB_t * pxNextTCB;
  2575. struct TCB_t * D.7818;
  2576. <bb 2> :
  2577. pxReturn = 0B;
  2578. _1 = pxList->uxNumberOfItems;
  2579. if (_1 != 0)
  2580. goto <bb 3>; [INV]
  2581. else
  2582. goto <bb 21>; [INV]
  2583. <bb 3> :
  2584. pxConstList = pxList;
  2585. _2 = pxConstList->pxIndex;
  2586. _3 = _2->pxNext;
  2587. pxConstList->pxIndex = _3;
  2588. _4 = pxConstList->pxIndex;
  2589. _5 = &pxConstList->xListEnd;
  2590. if (_4 == _5)
  2591. goto <bb 4>; [INV]
  2592. else
  2593. goto <bb 5>; [INV]
  2594. <bb 4> :
  2595. _6 = pxConstList->pxIndex;
  2596. _7 = _6->pxNext;
  2597. pxConstList->pxIndex = _7;
  2598. <bb 5> :
  2599. _8 = pxConstList->pxIndex;
  2600. pxFirstTCB = _8->pvOwner;
  2601. <bb 6> :
  2602. pxConstList = pxList;
  2603. _9 = pxConstList->pxIndex;
  2604. _10 = _9->pxNext;
  2605. pxConstList->pxIndex = _10;
  2606. _11 = pxConstList->pxIndex;
  2607. _12 = &pxConstList->xListEnd;
  2608. if (_11 == _12)
  2609. goto <bb 7>; [INV]
  2610. else
  2611. goto <bb 8>; [INV]
  2612. <bb 7> :
  2613. _13 = pxConstList->pxIndex;
  2614. _14 = _13->pxNext;
  2615. pxConstList->pxIndex = _14;
  2616. <bb 8> :
  2617. _15 = pxConstList->pxIndex;
  2618. pxNextTCB = _15->pvOwner;
  2619. xBreakLoop = 0;
  2620. x = 0;
  2621. goto <bb 16>; [INV]
  2622. <bb 9> :
  2623. cNextChar = pxNextTCB->pcTaskName[x];
  2624. _16 = pcNameToQuery + x;
  2625. _17 = *_16;
  2626. if (cNextChar != _17)
  2627. goto <bb 10>; [INV]
  2628. else
  2629. goto <bb 11>; [INV]
  2630. <bb 10> :
  2631. xBreakLoop = 1;
  2632. goto <bb 13>; [INV]
  2633. <bb 11> :
  2634. if (cNextChar == 0)
  2635. goto <bb 12>; [INV]
  2636. else
  2637. goto <bb 13>; [INV]
  2638. <bb 12> :
  2639. pxReturn = pxNextTCB;
  2640. xBreakLoop = 1;
  2641. <bb 13> :
  2642. if (xBreakLoop != 0)
  2643. goto <bb 14>; [INV]
  2644. else
  2645. goto <bb 15>; [INV]
  2646. <bb 14> :
  2647. goto <bb 17>; [INV]
  2648. <bb 15> :
  2649. x = x + 1;
  2650. <bb 16> :
  2651. if (x <= 9)
  2652. goto <bb 9>; [INV]
  2653. else
  2654. goto <bb 17>; [INV]
  2655. <bb 17> :
  2656. if (pxReturn != 0B)
  2657. goto <bb 18>; [INV]
  2658. else
  2659. goto <bb 19>; [INV]
  2660. <bb 18> :
  2661. goto <bb 20>; [INV]
  2662. <bb 19> :
  2663. if (pxNextTCB != pxFirstTCB)
  2664. goto <bb 6>; [INV]
  2665. else
  2666. goto <bb 20>; [INV]
  2667. <bb 20> :
  2668. <bb 21> :
  2669. D.7818 = pxReturn;
  2670. <bb 22> :
  2671. <L22>:
  2672. return D.7818;
  2673. }
  2674. pcTaskGetName (struct tskTaskControlBlock * xTaskToQuery)
  2675. {
  2676. struct TCB_t * pxTCB;
  2677. char * D.7799;
  2678. struct TCB_t * iftmp.51;
  2679. <bb 2> :
  2680. if (xTaskToQuery == 0B)
  2681. goto <bb 3>; [INV]
  2682. else
  2683. goto <bb 4>; [INV]
  2684. <bb 3> :
  2685. iftmp.51 = pxCurrentTCB;
  2686. goto <bb 5>; [INV]
  2687. <bb 4> :
  2688. iftmp.51 = xTaskToQuery;
  2689. <bb 5> :
  2690. pxTCB = iftmp.51;
  2691. if (pxTCB == 0B)
  2692. goto <bb 6>; [INV]
  2693. else
  2694. goto <bb 8>; [INV]
  2695. <bb 6> :
  2696. vPortRaiseBASEPRI ();
  2697. <bb 7> :
  2698. goto <bb 7>; [INV]
  2699. <bb 8> :
  2700. D.7799 = &pxTCB->pcTaskName[0];
  2701. <bb 9> :
  2702. <L6>:
  2703. return D.7799;
  2704. }
  2705. uxTaskGetNumberOfTasks ()
  2706. {
  2707. UBaseType_t D.7791;
  2708. <bb 2> :
  2709. D.7791 = uxCurrentNumberOfTasks;
  2710. <bb 3> :
  2711. <L0>:
  2712. return D.7791;
  2713. }
  2714. xTaskGetTickCountFromISR ()
  2715. {
  2716. UBaseType_t uxSavedInterruptStatus;
  2717. TickType_t xReturn;
  2718. TickType_t D.7789;
  2719. <bb 2> :
  2720. vPortValidateInterruptPriority ();
  2721. uxSavedInterruptStatus = 0;
  2722. xReturn = xTickCount;
  2723. D.7789 = xReturn;
  2724. <bb 3> :
  2725. <L0>:
  2726. return D.7789;
  2727. }
  2728. xTaskGetTickCount ()
  2729. {
  2730. TickType_t xTicks;
  2731. TickType_t D.7787;
  2732. <bb 2> :
  2733. xTicks = xTickCount;
  2734. D.7787 = xTicks;
  2735. <bb 3> :
  2736. <L0>:
  2737. return D.7787;
  2738. }
  2739. xTaskResumeAll ()
  2740. {
  2741. TickType_t xPendedCounts;
  2742. struct ListItem_t * const pxIndex;
  2743. struct List_t * const pxList;
  2744. struct List_t * const pxList;
  2745. BaseType_t xAlreadyYielded;
  2746. struct TCB_t * pxTCB;
  2747. BaseType_t D.7785;
  2748. <bb 2> :
  2749. pxTCB = 0B;
  2750. xAlreadyYielded = 0;
  2751. uxSchedulerSuspended.44_1 = uxSchedulerSuspended;
  2752. if (uxSchedulerSuspended.44_1 == 0)
  2753. goto <bb 3>; [INV]
  2754. else
  2755. goto <bb 5>; [INV]
  2756. <bb 3> :
  2757. vPortRaiseBASEPRI ();
  2758. <bb 4> :
  2759. goto <bb 4>; [INV]
  2760. <bb 5> :
  2761. vPortEnterCritical ();
  2762. uxSchedulerSuspended.45_2 = uxSchedulerSuspended;
  2763. _3 = uxSchedulerSuspended.45_2 + 4294967295;
  2764. uxSchedulerSuspended = _3;
  2765. uxSchedulerSuspended.46_4 = uxSchedulerSuspended;
  2766. if (uxSchedulerSuspended.46_4 == 0)
  2767. goto <bb 6>; [INV]
  2768. else
  2769. goto <bb 26>; [INV]
  2770. <bb 6> :
  2771. uxCurrentNumberOfTasks.47_5 = uxCurrentNumberOfTasks;
  2772. if (uxCurrentNumberOfTasks.47_5 != 0)
  2773. goto <bb 7>; [INV]
  2774. else
  2775. goto <bb 26>; [INV]
  2776. <bb 7> :
  2777. goto <bb 16>; [INV]
  2778. <bb 8> :
  2779. _6 = xPendingReadyList.xListEnd.pxNext;
  2780. pxTCB = _6->pvOwner;
  2781. pxList = pxTCB->xEventListItem.pvContainer;
  2782. _7 = pxTCB->xEventListItem.pxNext;
  2783. _8 = pxTCB->xEventListItem.pxPrevious;
  2784. _7->pxPrevious = _8;
  2785. _9 = pxTCB->xEventListItem.pxPrevious;
  2786. _10 = pxTCB->xEventListItem.pxNext;
  2787. _9->pxNext = _10;
  2788. _11 = pxList->pxIndex;
  2789. _12 = &pxTCB->xEventListItem;
  2790. if (_11 == _12)
  2791. goto <bb 9>; [INV]
  2792. else
  2793. goto <bb 10>; [INV]
  2794. <bb 9> :
  2795. _13 = pxTCB->xEventListItem.pxPrevious;
  2796. pxList->pxIndex = _13;
  2797. <bb 10> :
  2798. pxTCB->xEventListItem.pvContainer = 0B;
  2799. _14 = pxList->uxNumberOfItems;
  2800. _15 = _14 + 4294967295;
  2801. pxList->uxNumberOfItems = _15;
  2802. __asm__ __volatile__("" : : : "memory");
  2803. pxList = pxTCB->xStateListItem.pvContainer;
  2804. _16 = pxTCB->xStateListItem.pxNext;
  2805. _17 = pxTCB->xStateListItem.pxPrevious;
  2806. _16->pxPrevious = _17;
  2807. _18 = pxTCB->xStateListItem.pxPrevious;
  2808. _19 = pxTCB->xStateListItem.pxNext;
  2809. _18->pxNext = _19;
  2810. _20 = pxList->pxIndex;
  2811. _21 = &pxTCB->xStateListItem;
  2812. if (_20 == _21)
  2813. goto <bb 11>; [INV]
  2814. else
  2815. goto <bb 12>; [INV]
  2816. <bb 11> :
  2817. _22 = pxTCB->xStateListItem.pxPrevious;
  2818. pxList->pxIndex = _22;
  2819. <bb 12> :
  2820. pxTCB->xStateListItem.pvContainer = 0B;
  2821. _23 = pxList->uxNumberOfItems;
  2822. _24 = _23 + 4294967295;
  2823. pxList->uxNumberOfItems = _24;
  2824. _25 = pxTCB->uxPriority;
  2825. uxTopReadyPriority.48_26 = uxTopReadyPriority;
  2826. if (_25 > uxTopReadyPriority.48_26)
  2827. goto <bb 13>; [INV]
  2828. else
  2829. goto <bb 14>; [INV]
  2830. <bb 13> :
  2831. _27 = pxTCB->uxPriority;
  2832. uxTopReadyPriority = _27;
  2833. <bb 14> :
  2834. _28 = pxTCB->uxPriority;
  2835. pxIndex = pxReadyTasksLists[_28].pxIndex;
  2836. pxTCB->xStateListItem.pxNext = pxIndex;
  2837. _29 = pxIndex->pxPrevious;
  2838. pxTCB->xStateListItem.pxPrevious = _29;
  2839. _30 = pxIndex->pxPrevious;
  2840. _31 = &pxTCB->xStateListItem;
  2841. _30->pxNext = _31;
  2842. _32 = &pxTCB->xStateListItem;
  2843. pxIndex->pxPrevious = _32;
  2844. _33 = pxTCB->uxPriority;
  2845. _34 = &pxReadyTasksLists[_33];
  2846. pxTCB->xStateListItem.pvContainer = _34;
  2847. _35 = pxTCB->uxPriority;
  2848. _36 = pxReadyTasksLists[_35].uxNumberOfItems;
  2849. _37 = _36 + 1;
  2850. pxReadyTasksLists[_35].uxNumberOfItems = _37;
  2851. _38 = pxTCB->uxPriority;
  2852. pxCurrentTCB.49_39 = pxCurrentTCB;
  2853. _40 = pxCurrentTCB.49_39->uxPriority;
  2854. if (_38 >= _40)
  2855. goto <bb 15>; [INV]
  2856. else
  2857. goto <bb 16>; [INV]
  2858. <bb 15> :
  2859. xYieldPending = 1;
  2860. <bb 16> :
  2861. _41 = xPendingReadyList.uxNumberOfItems;
  2862. if (_41 != 0)
  2863. goto <bb 8>; [INV]
  2864. else
  2865. goto <bb 17>; [INV]
  2866. <bb 17> :
  2867. if (pxTCB != 0B)
  2868. goto <bb 18>; [INV]
  2869. else
  2870. goto <bb 19>; [INV]
  2871. <bb 18> :
  2872. prvResetNextTaskUnblockTime ();
  2873. <bb 19> :
  2874. xPendedCounts = xPendedTicks;
  2875. if (xPendedCounts != 0)
  2876. goto <bb 20>; [INV]
  2877. else
  2878. goto <bb 24>; [INV]
  2879. <bb 20> :
  2880. _42 = xTaskIncrementTick ();
  2881. if (_42 != 0)
  2882. goto <bb 21>; [INV]
  2883. else
  2884. goto <bb 22>; [INV]
  2885. <bb 21> :
  2886. xYieldPending = 1;
  2887. <bb 22> :
  2888. xPendedCounts = xPendedCounts + 4294967295;
  2889. if (xPendedCounts != 0)
  2890. goto <bb 20>; [INV]
  2891. else
  2892. goto <bb 23>; [INV]
  2893. <bb 23> :
  2894. xPendedTicks = 0;
  2895. <bb 24> :
  2896. xYieldPending.50_43 = xYieldPending;
  2897. if (xYieldPending.50_43 != 0)
  2898. goto <bb 25>; [INV]
  2899. else
  2900. goto <bb 26>; [INV]
  2901. <bb 25> :
  2902. xAlreadyYielded = 1;
  2903. _44 = 3758157060B;
  2904. *_44 = 268435456;
  2905. __asm__ __volatile__("dsb" : : : "memory");
  2906. __asm__ __volatile__("isb");
  2907. <bb 26> :
  2908. vPortExitCritical ();
  2909. D.7785 = xAlreadyYielded;
  2910. <bb 27> :
  2911. <L33>:
  2912. return D.7785;
  2913. }
  2914. vTaskSuspendAll ()
  2915. {
  2916. <bb 2> :
  2917. uxSchedulerSuspended.43_1 = uxSchedulerSuspended;
  2918. _2 = uxSchedulerSuspended.43_1 + 1;
  2919. uxSchedulerSuspended = _2;
  2920. __asm__ __volatile__("" : : : "memory");
  2921. return;
  2922. }
  2923. vTaskEndScheduler ()
  2924. {
  2925. <bb 2> :
  2926. vPortRaiseBASEPRI ();
  2927. xSchedulerRunning = 0;
  2928. vPortEndScheduler ();
  2929. return;
  2930. }
  2931. vTaskStartScheduler ()
  2932. {
  2933. BaseType_t xReturn;
  2934. long unsigned int vol.42;
  2935. <bb 2> :
  2936. xReturn = xTaskCreate (prvIdleTask, "IDLE", 90, 0B, 0, &xIdleTaskHandle);
  2937. if (xReturn == 1)
  2938. goto <bb 3>; [INV]
  2939. else
  2940. goto <bb 4>; [INV]
  2941. <bb 3> :
  2942. xReturn = xTimerCreateTimerTask ();
  2943. <bb 4> :
  2944. if (xReturn == 1)
  2945. goto <bb 5>; [INV]
  2946. else
  2947. goto <bb 6>; [INV]
  2948. <bb 5> :
  2949. vPortRaiseBASEPRI ();
  2950. xNextTaskUnblockTime = 4294967295;
  2951. xSchedulerRunning = 1;
  2952. xTickCount = 0;
  2953. _1 = xPortStartScheduler ();
  2954. goto <bb 9>; [INV]
  2955. <bb 6> :
  2956. if (xReturn == -1)
  2957. goto <bb 7>; [INV]
  2958. else
  2959. goto <bb 9>; [INV]
  2960. <bb 7> :
  2961. vPortRaiseBASEPRI ();
  2962. <bb 8> :
  2963. goto <bb 8>; [INV]
  2964. <bb 9> :
  2965. vol.42 = uxTopUsedPriority;
  2966. return;
  2967. }
  2968. xTaskResumeFromISR (struct tskTaskControlBlock * xTaskToResume)
  2969. {
  2970. struct ListItem_t * const pxIndex;
  2971. UBaseType_t uxSavedInterruptStatus;
  2972. struct TCB_t * const pxTCB;
  2973. BaseType_t xYieldRequired;
  2974. BaseType_t D.7744;
  2975. <bb 2> :
  2976. xYieldRequired = 0;
  2977. pxTCB = xTaskToResume;
  2978. if (xTaskToResume == 0B)
  2979. goto <bb 3>; [INV]
  2980. else
  2981. goto <bb 5>; [INV]
  2982. <bb 3> :
  2983. vPortRaiseBASEPRI ();
  2984. <bb 4> :
  2985. goto <bb 4>; [INV]
  2986. <bb 5> :
  2987. vPortValidateInterruptPriority ();
  2988. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  2989. _1 = prvTaskIsTaskSuspended (pxTCB);
  2990. if (_1 != 0)
  2991. goto <bb 6>; [INV]
  2992. else
  2993. goto <bb 13>; [INV]
  2994. <bb 6> :
  2995. uxSchedulerSuspended.39_2 = uxSchedulerSuspended;
  2996. if (uxSchedulerSuspended.39_2 == 0)
  2997. goto <bb 7>; [INV]
  2998. else
  2999. goto <bb 12>; [INV]
  3000. <bb 7> :
  3001. _3 = pxTCB->uxPriority;
  3002. pxCurrentTCB.40_4 = pxCurrentTCB;
  3003. _5 = pxCurrentTCB.40_4->uxPriority;
  3004. if (_3 >= _5)
  3005. goto <bb 8>; [INV]
  3006. else
  3007. goto <bb 9>; [INV]
  3008. <bb 8> :
  3009. xYieldRequired = 1;
  3010. xYieldPending = 1;
  3011. <bb 9> :
  3012. _6 = &pxTCB->xStateListItem;
  3013. uxListRemove (_6);
  3014. _7 = pxTCB->uxPriority;
  3015. uxTopReadyPriority.41_8 = uxTopReadyPriority;
  3016. if (_7 > uxTopReadyPriority.41_8)
  3017. goto <bb 10>; [INV]
  3018. else
  3019. goto <bb 11>; [INV]
  3020. <bb 10> :
  3021. _9 = pxTCB->uxPriority;
  3022. uxTopReadyPriority = _9;
  3023. <bb 11> :
  3024. _10 = pxTCB->uxPriority;
  3025. pxIndex = pxReadyTasksLists[_10].pxIndex;
  3026. pxTCB->xStateListItem.pxNext = pxIndex;
  3027. _11 = pxIndex->pxPrevious;
  3028. pxTCB->xStateListItem.pxPrevious = _11;
  3029. _12 = pxIndex->pxPrevious;
  3030. _13 = &pxTCB->xStateListItem;
  3031. _12->pxNext = _13;
  3032. _14 = &pxTCB->xStateListItem;
  3033. pxIndex->pxPrevious = _14;
  3034. _15 = pxTCB->uxPriority;
  3035. _16 = &pxReadyTasksLists[_15];
  3036. pxTCB->xStateListItem.pvContainer = _16;
  3037. _17 = pxTCB->uxPriority;
  3038. _18 = pxReadyTasksLists[_17].uxNumberOfItems;
  3039. _19 = _18 + 1;
  3040. pxReadyTasksLists[_17].uxNumberOfItems = _19;
  3041. goto <bb 13>; [INV]
  3042. <bb 12> :
  3043. _20 = &pxTCB->xEventListItem;
  3044. vListInsertEnd (&xPendingReadyList, _20);
  3045. <bb 13> :
  3046. vPortSetBASEPRI (uxSavedInterruptStatus);
  3047. D.7744 = xYieldRequired;
  3048. <bb 14> :
  3049. <L14>:
  3050. return D.7744;
  3051. }
  3052. vTaskResume (struct tskTaskControlBlock * xTaskToResume)
  3053. {
  3054. struct ListItem_t * const pxIndex;
  3055. struct TCB_t * const pxTCB;
  3056. <bb 2> :
  3057. pxTCB = xTaskToResume;
  3058. if (xTaskToResume == 0B)
  3059. goto <bb 3>; [INV]
  3060. else
  3061. goto <bb 5>; [INV]
  3062. <bb 3> :
  3063. vPortRaiseBASEPRI ();
  3064. <bb 4> :
  3065. goto <bb 4>; [INV]
  3066. <bb 5> :
  3067. pxCurrentTCB.36_1 = pxCurrentTCB;
  3068. if (pxTCB != pxCurrentTCB.36_1)
  3069. goto <bb 6>; [INV]
  3070. else
  3071. goto <bb 13>; [INV]
  3072. <bb 6> :
  3073. if (pxTCB != 0B)
  3074. goto <bb 7>; [INV]
  3075. else
  3076. goto <bb 13>; [INV]
  3077. <bb 7> :
  3078. vPortEnterCritical ();
  3079. _2 = prvTaskIsTaskSuspended (pxTCB);
  3080. if (_2 != 0)
  3081. goto <bb 8>; [INV]
  3082. else
  3083. goto <bb 12>; [INV]
  3084. <bb 8> :
  3085. _3 = &pxTCB->xStateListItem;
  3086. uxListRemove (_3);
  3087. _4 = pxTCB->uxPriority;
  3088. uxTopReadyPriority.37_5 = uxTopReadyPriority;
  3089. if (_4 > uxTopReadyPriority.37_5)
  3090. goto <bb 9>; [INV]
  3091. else
  3092. goto <bb 10>; [INV]
  3093. <bb 9> :
  3094. _6 = pxTCB->uxPriority;
  3095. uxTopReadyPriority = _6;
  3096. <bb 10> :
  3097. _7 = pxTCB->uxPriority;
  3098. pxIndex = pxReadyTasksLists[_7].pxIndex;
  3099. pxTCB->xStateListItem.pxNext = pxIndex;
  3100. _8 = pxIndex->pxPrevious;
  3101. pxTCB->xStateListItem.pxPrevious = _8;
  3102. _9 = pxIndex->pxPrevious;
  3103. _10 = &pxTCB->xStateListItem;
  3104. _9->pxNext = _10;
  3105. _11 = &pxTCB->xStateListItem;
  3106. pxIndex->pxPrevious = _11;
  3107. _12 = pxTCB->uxPriority;
  3108. _13 = &pxReadyTasksLists[_12];
  3109. pxTCB->xStateListItem.pvContainer = _13;
  3110. _14 = pxTCB->uxPriority;
  3111. _15 = pxReadyTasksLists[_14].uxNumberOfItems;
  3112. _16 = _15 + 1;
  3113. pxReadyTasksLists[_14].uxNumberOfItems = _16;
  3114. _17 = pxTCB->uxPriority;
  3115. pxCurrentTCB.38_18 = pxCurrentTCB;
  3116. _19 = pxCurrentTCB.38_18->uxPriority;
  3117. if (_17 >= _19)
  3118. goto <bb 11>; [INV]
  3119. else
  3120. goto <bb 12>; [INV]
  3121. <bb 11> :
  3122. _20 = 3758157060B;
  3123. *_20 = 268435456;
  3124. __asm__ __volatile__("dsb" : : : "memory");
  3125. __asm__ __volatile__("isb");
  3126. <bb 12> :
  3127. vPortExitCritical ();
  3128. <bb 13> :
  3129. return;
  3130. }
  3131. prvTaskIsTaskSuspended (struct tskTaskControlBlock * const xTask)
  3132. {
  3133. const struct TCB_t * const pxTCB;
  3134. BaseType_t xReturn;
  3135. BaseType_t D.7714;
  3136. <bb 2> :
  3137. xReturn = 0;
  3138. pxTCB = xTask;
  3139. if (xTask == 0B)
  3140. goto <bb 3>; [INV]
  3141. else
  3142. goto <bb 5>; [INV]
  3143. <bb 3> :
  3144. vPortRaiseBASEPRI ();
  3145. <bb 4> :
  3146. goto <bb 4>; [INV]
  3147. <bb 5> :
  3148. _1 = pxTCB->xStateListItem.pvContainer;
  3149. if (_1 == &xSuspendedTaskList)
  3150. goto <bb 6>; [INV]
  3151. else
  3152. goto <bb 9>; [INV]
  3153. <bb 6> :
  3154. _2 = pxTCB->xEventListItem.pvContainer;
  3155. if (_2 != &xPendingReadyList)
  3156. goto <bb 7>; [INV]
  3157. else
  3158. goto <bb 9>; [INV]
  3159. <bb 7> :
  3160. _3 = pxTCB->xEventListItem.pvContainer;
  3161. if (_3 == 0B)
  3162. goto <bb 8>; [INV]
  3163. else
  3164. goto <bb 9>; [INV]
  3165. <bb 8> :
  3166. xReturn = 1;
  3167. <bb 9> :
  3168. D.7714 = xReturn;
  3169. <bb 10> :
  3170. <L12>:
  3171. return D.7714;
  3172. }
  3173. vTaskSuspend (struct tskTaskControlBlock * xTaskToSuspend)
  3174. {
  3175. BaseType_t x;
  3176. struct TCB_t * pxTCB;
  3177. struct TCB_t * iftmp.30;
  3178. <bb 2> :
  3179. vPortEnterCritical ();
  3180. if (xTaskToSuspend == 0B)
  3181. goto <bb 3>; [INV]
  3182. else
  3183. goto <bb 4>; [INV]
  3184. <bb 3> :
  3185. iftmp.30 = pxCurrentTCB;
  3186. goto <bb 5>; [INV]
  3187. <bb 4> :
  3188. iftmp.30 = xTaskToSuspend;
  3189. <bb 5> :
  3190. pxTCB = iftmp.30;
  3191. _1 = &pxTCB->xStateListItem;
  3192. _2 = uxListRemove (_1);
  3193. <bb 6> :
  3194. _3 = pxTCB->xEventListItem.pvContainer;
  3195. if (_3 != 0B)
  3196. goto <bb 7>; [INV]
  3197. else
  3198. goto <bb 8>; [INV]
  3199. <bb 7> :
  3200. _4 = &pxTCB->xEventListItem;
  3201. uxListRemove (_4);
  3202. <bb 8> :
  3203. _5 = &pxTCB->xStateListItem;
  3204. vListInsertEnd (&xSuspendedTaskList, _5);
  3205. x = 0;
  3206. goto <bb 12>; [INV]
  3207. <bb 9> :
  3208. _6 = pxTCB->ucNotifyState[x];
  3209. if (_6 == 1)
  3210. goto <bb 10>; [INV]
  3211. else
  3212. goto <bb 11>; [INV]
  3213. <bb 10> :
  3214. pxTCB->ucNotifyState[x] = 0;
  3215. <bb 11> :
  3216. x = x + 1;
  3217. <bb 12> :
  3218. if (x <= 0)
  3219. goto <bb 9>; [INV]
  3220. else
  3221. goto <bb 13>; [INV]
  3222. <bb 13> :
  3223. vPortExitCritical ();
  3224. xSchedulerRunning.31_7 = xSchedulerRunning;
  3225. if (xSchedulerRunning.31_7 != 0)
  3226. goto <bb 14>; [INV]
  3227. else
  3228. goto <bb 15>; [INV]
  3229. <bb 14> :
  3230. vPortEnterCritical ();
  3231. prvResetNextTaskUnblockTime ();
  3232. vPortExitCritical ();
  3233. <bb 15> :
  3234. pxCurrentTCB.32_8 = pxCurrentTCB;
  3235. if (pxTCB == pxCurrentTCB.32_8)
  3236. goto <bb 16>; [INV]
  3237. else
  3238. goto <bb 24>; [INV]
  3239. <bb 16> :
  3240. xSchedulerRunning.33_9 = xSchedulerRunning;
  3241. if (xSchedulerRunning.33_9 != 0)
  3242. goto <bb 17>; [INV]
  3243. else
  3244. goto <bb 21>; [INV]
  3245. <bb 17> :
  3246. uxSchedulerSuspended.34_10 = uxSchedulerSuspended;
  3247. if (uxSchedulerSuspended.34_10 != 0)
  3248. goto <bb 18>; [INV]
  3249. else
  3250. goto <bb 20>; [INV]
  3251. <bb 18> :
  3252. vPortRaiseBASEPRI ();
  3253. <bb 19> :
  3254. goto <bb 19>; [INV]
  3255. <bb 20> :
  3256. _11 = 3758157060B;
  3257. *_11 = 268435456;
  3258. __asm__ __volatile__("dsb" : : : "memory");
  3259. __asm__ __volatile__("isb");
  3260. goto <bb 24>; [INV]
  3261. <bb 21> :
  3262. _12 = xSuspendedTaskList.uxNumberOfItems;
  3263. uxCurrentNumberOfTasks.35_13 = uxCurrentNumberOfTasks;
  3264. if (_12 == uxCurrentNumberOfTasks.35_13)
  3265. goto <bb 22>; [INV]
  3266. else
  3267. goto <bb 23>; [INV]
  3268. <bb 22> :
  3269. pxCurrentTCB = 0B;
  3270. goto <bb 24>; [INV]
  3271. <bb 23> :
  3272. vTaskSwitchContext ();
  3273. <bb 24> :
  3274. return;
  3275. }
  3276. vTaskPrioritySet (struct tskTaskControlBlock * xTask, UBaseType_t uxNewPriority)
  3277. {
  3278. struct ListItem_t * const pxIndex;
  3279. BaseType_t xYieldRequired;
  3280. UBaseType_t uxPriorityUsedOnEntry;
  3281. UBaseType_t uxCurrentBasePriority;
  3282. struct TCB_t * pxTCB;
  3283. struct TCB_t * iftmp.25;
  3284. <bb 2> :
  3285. xYieldRequired = 0;
  3286. if (uxNewPriority > 4)
  3287. goto <bb 3>; [INV]
  3288. else
  3289. goto <bb 5>; [INV]
  3290. <bb 3> :
  3291. vPortRaiseBASEPRI ();
  3292. <bb 4> :
  3293. goto <bb 4>; [INV]
  3294. <bb 5> :
  3295. if (uxNewPriority > 4)
  3296. goto <bb 6>; [INV]
  3297. else
  3298. goto <bb 7>; [INV]
  3299. <bb 6> :
  3300. uxNewPriority = 4;
  3301. <bb 7> :
  3302. vPortEnterCritical ();
  3303. if (xTask == 0B)
  3304. goto <bb 8>; [INV]
  3305. else
  3306. goto <bb 9>; [INV]
  3307. <bb 8> :
  3308. iftmp.25 = pxCurrentTCB;
  3309. goto <bb 10>; [INV]
  3310. <bb 9> :
  3311. iftmp.25 = xTask;
  3312. <bb 10> :
  3313. pxTCB = iftmp.25;
  3314. uxCurrentBasePriority = pxTCB->uxBasePriority;
  3315. if (uxCurrentBasePriority != uxNewPriority)
  3316. goto <bb 11>; [INV]
  3317. else
  3318. goto <bb 28>; [INV]
  3319. <bb 11> :
  3320. if (uxNewPriority > uxCurrentBasePriority)
  3321. goto <bb 12>; [INV]
  3322. else
  3323. goto <bb 15>; [INV]
  3324. <bb 12> :
  3325. pxCurrentTCB.26_1 = pxCurrentTCB;
  3326. if (pxTCB != pxCurrentTCB.26_1)
  3327. goto <bb 13>; [INV]
  3328. else
  3329. goto <bb 17>; [INV]
  3330. <bb 13> :
  3331. pxCurrentTCB.27_2 = pxCurrentTCB;
  3332. _3 = pxCurrentTCB.27_2->uxPriority;
  3333. if (uxNewPriority >= _3)
  3334. goto <bb 14>; [INV]
  3335. else
  3336. goto <bb 17>; [INV]
  3337. <bb 14> :
  3338. xYieldRequired = 1;
  3339. goto <bb 17>; [INV]
  3340. <bb 15> :
  3341. pxCurrentTCB.28_4 = pxCurrentTCB;
  3342. if (pxTCB == pxCurrentTCB.28_4)
  3343. goto <bb 16>; [INV]
  3344. else
  3345. goto <bb 17>; [INV]
  3346. <bb 16> :
  3347. xYieldRequired = 1;
  3348. <bb 17> :
  3349. uxPriorityUsedOnEntry = pxTCB->uxPriority;
  3350. _5 = pxTCB->uxBasePriority;
  3351. _6 = pxTCB->uxPriority;
  3352. if (_5 == _6)
  3353. goto <bb 18>; [INV]
  3354. else
  3355. goto <bb 19>; [INV]
  3356. <bb 18> :
  3357. pxTCB->uxPriority = uxNewPriority;
  3358. <bb 19> :
  3359. pxTCB->uxBasePriority = uxNewPriority;
  3360. _7 = pxTCB->xEventListItem.xItemValue;
  3361. _8 = (signed int) _7;
  3362. if (_8 >= 0)
  3363. goto <bb 20>; [INV]
  3364. else
  3365. goto <bb 21>; [INV]
  3366. <bb 20> :
  3367. _9 = 5 - uxNewPriority;
  3368. pxTCB->xEventListItem.xItemValue = _9;
  3369. <bb 21> :
  3370. _10 = pxTCB->xStateListItem.pvContainer;
  3371. _11 = &pxReadyTasksLists[uxPriorityUsedOnEntry];
  3372. if (_10 == _11)
  3373. goto <bb 22>; [INV]
  3374. else
  3375. goto <bb 26>; [INV]
  3376. <bb 22> :
  3377. _12 = &pxTCB->xStateListItem;
  3378. _13 = uxListRemove (_12);
  3379. <bb 23> :
  3380. _14 = pxTCB->uxPriority;
  3381. uxTopReadyPriority.29_15 = uxTopReadyPriority;
  3382. if (_14 > uxTopReadyPriority.29_15)
  3383. goto <bb 24>; [INV]
  3384. else
  3385. goto <bb 25>; [INV]
  3386. <bb 24> :
  3387. _16 = pxTCB->uxPriority;
  3388. uxTopReadyPriority = _16;
  3389. <bb 25> :
  3390. _17 = pxTCB->uxPriority;
  3391. pxIndex = pxReadyTasksLists[_17].pxIndex;
  3392. pxTCB->xStateListItem.pxNext = pxIndex;
  3393. _18 = pxIndex->pxPrevious;
  3394. pxTCB->xStateListItem.pxPrevious = _18;
  3395. _19 = pxIndex->pxPrevious;
  3396. _20 = &pxTCB->xStateListItem;
  3397. _19->pxNext = _20;
  3398. _21 = &pxTCB->xStateListItem;
  3399. pxIndex->pxPrevious = _21;
  3400. _22 = pxTCB->uxPriority;
  3401. _23 = &pxReadyTasksLists[_22];
  3402. pxTCB->xStateListItem.pvContainer = _23;
  3403. _24 = pxTCB->uxPriority;
  3404. _25 = pxReadyTasksLists[_24].uxNumberOfItems;
  3405. _26 = _25 + 1;
  3406. pxReadyTasksLists[_24].uxNumberOfItems = _26;
  3407. <bb 26> :
  3408. if (xYieldRequired != 0)
  3409. goto <bb 27>; [INV]
  3410. else
  3411. goto <bb 28>; [INV]
  3412. <bb 27> :
  3413. _27 = 3758157060B;
  3414. *_27 = 268435456;
  3415. __asm__ __volatile__("dsb" : : : "memory");
  3416. __asm__ __volatile__("isb");
  3417. <bb 28> :
  3418. vPortExitCritical ();
  3419. return;
  3420. }
  3421. uxTaskPriorityGetFromISR (struct tskTaskControlBlock * const xTask)
  3422. {
  3423. UBaseType_t uxSavedInterruptState;
  3424. UBaseType_t uxReturn;
  3425. const struct TCB_t * pxTCB;
  3426. UBaseType_t D.7633;
  3427. const struct TCB_t * iftmp.24;
  3428. <bb 2> :
  3429. vPortValidateInterruptPriority ();
  3430. uxSavedInterruptState = ulPortRaiseBASEPRI ();
  3431. if (xTask == 0B)
  3432. goto <bb 3>; [INV]
  3433. else
  3434. goto <bb 4>; [INV]
  3435. <bb 3> :
  3436. iftmp.24 = pxCurrentTCB;
  3437. goto <bb 5>; [INV]
  3438. <bb 4> :
  3439. iftmp.24 = xTask;
  3440. <bb 5> :
  3441. pxTCB = iftmp.24;
  3442. uxReturn = pxTCB->uxPriority;
  3443. vPortSetBASEPRI (uxSavedInterruptState);
  3444. D.7633 = uxReturn;
  3445. <bb 6> :
  3446. <L3>:
  3447. return D.7633;
  3448. }
  3449. uxTaskPriorityGet (struct tskTaskControlBlock * const xTask)
  3450. {
  3451. UBaseType_t uxReturn;
  3452. const struct TCB_t * pxTCB;
  3453. UBaseType_t D.7627;
  3454. const struct TCB_t * iftmp.23;
  3455. <bb 2> :
  3456. vPortEnterCritical ();
  3457. if (xTask == 0B)
  3458. goto <bb 3>; [INV]
  3459. else
  3460. goto <bb 4>; [INV]
  3461. <bb 3> :
  3462. iftmp.23 = pxCurrentTCB;
  3463. goto <bb 5>; [INV]
  3464. <bb 4> :
  3465. iftmp.23 = xTask;
  3466. <bb 5> :
  3467. pxTCB = iftmp.23;
  3468. uxReturn = pxTCB->uxPriority;
  3469. vPortExitCritical ();
  3470. D.7627 = uxReturn;
  3471. <bb 6> :
  3472. <L3>:
  3473. return D.7627;
  3474. }
  3475. eTaskGetState (struct tskTaskControlBlock * xTask)
  3476. {
  3477. BaseType_t x;
  3478. const struct TCB_t * const pxTCB;
  3479. const struct List_t * pxOverflowedDelayedList;
  3480. const struct List_t * pxDelayedList;
  3481. const struct List_t * pxStateList;
  3482. eTaskState eReturn;
  3483. eTaskState D.7621;
  3484. <bb 2> :
  3485. pxTCB = xTask;
  3486. if (pxTCB == 0B)
  3487. goto <bb 3>; [INV]
  3488. else
  3489. goto <bb 5>; [INV]
  3490. <bb 3> :
  3491. vPortRaiseBASEPRI ();
  3492. <bb 4> :
  3493. goto <bb 4>; [INV]
  3494. <bb 5> :
  3495. pxCurrentTCB.22_1 = pxCurrentTCB;
  3496. if (pxTCB == pxCurrentTCB.22_1)
  3497. goto <bb 6>; [INV]
  3498. else
  3499. goto <bb 7>; [INV]
  3500. <bb 6> :
  3501. eReturn = 0;
  3502. goto <bb 23>; [INV]
  3503. <bb 7> :
  3504. vPortEnterCritical ();
  3505. pxStateList = pxTCB->xStateListItem.pvContainer;
  3506. pxDelayedList = pxDelayedTaskList;
  3507. pxOverflowedDelayedList = pxOverflowDelayedTaskList;
  3508. vPortExitCritical ();
  3509. if (pxStateList == pxDelayedList)
  3510. goto <bb 9>; [INV]
  3511. else
  3512. goto <bb 8>; [INV]
  3513. <bb 8> :
  3514. if (pxStateList == pxOverflowedDelayedList)
  3515. goto <bb 9>; [INV]
  3516. else
  3517. goto <bb 10>; [INV]
  3518. <bb 9> :
  3519. eReturn = 2;
  3520. goto <bb 23>; [INV]
  3521. <bb 10> :
  3522. if (pxStateList == &xSuspendedTaskList)
  3523. goto <bb 11>; [INV]
  3524. else
  3525. goto <bb 19>; [INV]
  3526. <bb 11> :
  3527. _2 = pxTCB->xEventListItem.pvContainer;
  3528. if (_2 == 0B)
  3529. goto <bb 12>; [INV]
  3530. else
  3531. goto <bb 18>; [INV]
  3532. <bb 12> :
  3533. eReturn = 3;
  3534. x = 0;
  3535. goto <bb 16>; [INV]
  3536. <bb 13> :
  3537. _3 = pxTCB->ucNotifyState[x];
  3538. if (_3 == 1)
  3539. goto <bb 14>; [INV]
  3540. else
  3541. goto <bb 15>; [INV]
  3542. <bb 14> :
  3543. eReturn = 2;
  3544. goto <bb 17>; [INV]
  3545. <bb 15> :
  3546. x = x + 1;
  3547. <bb 16> :
  3548. if (x <= 0)
  3549. goto <bb 13>; [INV]
  3550. else
  3551. goto <bb 17>; [INV]
  3552. <bb 17> :
  3553. goto <bb 23>; [INV]
  3554. <bb 18> :
  3555. eReturn = 2;
  3556. goto <bb 23>; [INV]
  3557. <bb 19> :
  3558. if (pxStateList == &xTasksWaitingTermination)
  3559. goto <bb 21>; [INV]
  3560. else
  3561. goto <bb 20>; [INV]
  3562. <bb 20> :
  3563. if (pxStateList == 0B)
  3564. goto <bb 21>; [INV]
  3565. else
  3566. goto <bb 22>; [INV]
  3567. <bb 21> :
  3568. eReturn = 4;
  3569. goto <bb 23>; [INV]
  3570. <bb 22> :
  3571. eReturn = 1;
  3572. <bb 23> :
  3573. D.7621 = eReturn;
  3574. <bb 24> :
  3575. <L25>:
  3576. return D.7621;
  3577. }
  3578. vTaskDelay (const TickType_t xTicksToDelay)
  3579. {
  3580. BaseType_t xAlreadyYielded;
  3581. <bb 2> :
  3582. xAlreadyYielded = 0;
  3583. if (xTicksToDelay != 0)
  3584. goto <bb 3>; [INV]
  3585. else
  3586. goto <bb 7>; [INV]
  3587. <bb 3> :
  3588. uxSchedulerSuspended.21_1 = uxSchedulerSuspended;
  3589. if (uxSchedulerSuspended.21_1 != 0)
  3590. goto <bb 4>; [INV]
  3591. else
  3592. goto <bb 6>; [INV]
  3593. <bb 4> :
  3594. vPortRaiseBASEPRI ();
  3595. <bb 5> :
  3596. goto <bb 5>; [INV]
  3597. <bb 6> :
  3598. vTaskSuspendAll ();
  3599. prvAddCurrentTaskToDelayedList (xTicksToDelay, 0);
  3600. xAlreadyYielded = xTaskResumeAll ();
  3601. <bb 7> :
  3602. if (xAlreadyYielded == 0)
  3603. goto <bb 8>; [INV]
  3604. else
  3605. goto <bb 9>; [INV]
  3606. <bb 8> :
  3607. _2 = 3758157060B;
  3608. *_2 = 268435456;
  3609. __asm__ __volatile__("dsb" : : : "memory");
  3610. __asm__ __volatile__("isb");
  3611. <bb 9> :
  3612. return;
  3613. }
  3614. xTaskDelayUntil (TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement)
  3615. {
  3616. const TickType_t xConstTickCount;
  3617. BaseType_t xShouldDelay;
  3618. BaseType_t xAlreadyYielded;
  3619. TickType_t xTimeToWake;
  3620. BaseType_t D.7590;
  3621. <bb 2> :
  3622. xShouldDelay = 0;
  3623. if (pxPreviousWakeTime == 0B)
  3624. goto <bb 3>; [INV]
  3625. else
  3626. goto <bb 5>; [INV]
  3627. <bb 3> :
  3628. vPortRaiseBASEPRI ();
  3629. <bb 4> :
  3630. goto <bb 4>; [INV]
  3631. <bb 5> :
  3632. if (xTimeIncrement == 0)
  3633. goto <bb 6>; [INV]
  3634. else
  3635. goto <bb 8>; [INV]
  3636. <bb 6> :
  3637. vPortRaiseBASEPRI ();
  3638. <bb 7> :
  3639. goto <bb 7>; [INV]
  3640. <bb 8> :
  3641. uxSchedulerSuspended.20_1 = uxSchedulerSuspended;
  3642. if (uxSchedulerSuspended.20_1 != 0)
  3643. goto <bb 9>; [INV]
  3644. else
  3645. goto <bb 11>; [INV]
  3646. <bb 9> :
  3647. vPortRaiseBASEPRI ();
  3648. <bb 10> :
  3649. goto <bb 10>; [INV]
  3650. <bb 11> :
  3651. vTaskSuspendAll ();
  3652. xConstTickCount = xTickCount;
  3653. _2 = *pxPreviousWakeTime;
  3654. xTimeToWake = xTimeIncrement + _2;
  3655. _3 = *pxPreviousWakeTime;
  3656. if (xConstTickCount < _3)
  3657. goto <bb 12>; [INV]
  3658. else
  3659. goto <bb 15>; [INV]
  3660. <bb 12> :
  3661. _4 = *pxPreviousWakeTime;
  3662. if (xTimeToWake < _4)
  3663. goto <bb 13>; [INV]
  3664. else
  3665. goto <bb 18>; [INV]
  3666. <bb 13> :
  3667. if (xTimeToWake > xConstTickCount)
  3668. goto <bb 14>; [INV]
  3669. else
  3670. goto <bb 18>; [INV]
  3671. <bb 14> :
  3672. xShouldDelay = 1;
  3673. goto <bb 18>; [INV]
  3674. <bb 15> :
  3675. _5 = *pxPreviousWakeTime;
  3676. if (xTimeToWake < _5)
  3677. goto <bb 17>; [INV]
  3678. else
  3679. goto <bb 16>; [INV]
  3680. <bb 16> :
  3681. if (xTimeToWake > xConstTickCount)
  3682. goto <bb 17>; [INV]
  3683. else
  3684. goto <bb 18>; [INV]
  3685. <bb 17> :
  3686. xShouldDelay = 1;
  3687. <bb 18> :
  3688. *pxPreviousWakeTime = xTimeToWake;
  3689. if (xShouldDelay != 0)
  3690. goto <bb 19>; [INV]
  3691. else
  3692. goto <bb 20>; [INV]
  3693. <bb 19> :
  3694. _6 = xTimeToWake - xConstTickCount;
  3695. prvAddCurrentTaskToDelayedList (_6, 0);
  3696. <bb 20> :
  3697. xAlreadyYielded = xTaskResumeAll ();
  3698. if (xAlreadyYielded == 0)
  3699. goto <bb 21>; [INV]
  3700. else
  3701. goto <bb 22>; [INV]
  3702. <bb 21> :
  3703. _7 = 3758157060B;
  3704. *_7 = 268435456;
  3705. __asm__ __volatile__("dsb" : : : "memory");
  3706. __asm__ __volatile__("isb");
  3707. <bb 22> :
  3708. D.7590 = xShouldDelay;
  3709. <bb 23> :
  3710. <L26>:
  3711. return D.7590;
  3712. }
  3713. vTaskDelete (struct tskTaskControlBlock * xTaskToDelete)
  3714. {
  3715. struct TCB_t * pxTCB;
  3716. struct TCB_t * iftmp.12;
  3717. <bb 2> :
  3718. vPortEnterCritical ();
  3719. if (xTaskToDelete == 0B)
  3720. goto <bb 3>; [INV]
  3721. else
  3722. goto <bb 4>; [INV]
  3723. <bb 3> :
  3724. iftmp.12 = pxCurrentTCB;
  3725. goto <bb 5>; [INV]
  3726. <bb 4> :
  3727. iftmp.12 = xTaskToDelete;
  3728. <bb 5> :
  3729. pxTCB = iftmp.12;
  3730. _1 = &pxTCB->xStateListItem;
  3731. _2 = uxListRemove (_1);
  3732. <bb 6> :
  3733. _3 = pxTCB->xEventListItem.pvContainer;
  3734. if (_3 != 0B)
  3735. goto <bb 7>; [INV]
  3736. else
  3737. goto <bb 8>; [INV]
  3738. <bb 7> :
  3739. _4 = &pxTCB->xEventListItem;
  3740. uxListRemove (_4);
  3741. <bb 8> :
  3742. uxTaskNumber.13_5 = uxTaskNumber;
  3743. _6 = uxTaskNumber.13_5 + 1;
  3744. uxTaskNumber = _6;
  3745. pxCurrentTCB.14_7 = pxCurrentTCB;
  3746. if (pxTCB == pxCurrentTCB.14_7)
  3747. goto <bb 9>; [INV]
  3748. else
  3749. goto <bb 10>; [INV]
  3750. <bb 9> :
  3751. _8 = &pxTCB->xStateListItem;
  3752. vListInsertEnd (&xTasksWaitingTermination, _8);
  3753. uxDeletedTasksWaitingCleanUp.15_9 = uxDeletedTasksWaitingCleanUp;
  3754. _10 = uxDeletedTasksWaitingCleanUp.15_9 + 1;
  3755. uxDeletedTasksWaitingCleanUp = _10;
  3756. goto <bb 11>; [INV]
  3757. <bb 10> :
  3758. uxCurrentNumberOfTasks.16_11 = uxCurrentNumberOfTasks;
  3759. _12 = uxCurrentNumberOfTasks.16_11 + 4294967295;
  3760. uxCurrentNumberOfTasks = _12;
  3761. prvDeleteTCB (pxTCB);
  3762. prvResetNextTaskUnblockTime ();
  3763. <bb 11> :
  3764. vPortExitCritical ();
  3765. xSchedulerRunning.17_13 = xSchedulerRunning;
  3766. if (xSchedulerRunning.17_13 != 0)
  3767. goto <bb 12>; [INV]
  3768. else
  3769. goto <bb 17>; [INV]
  3770. <bb 12> :
  3771. pxCurrentTCB.18_14 = pxCurrentTCB;
  3772. if (pxTCB == pxCurrentTCB.18_14)
  3773. goto <bb 13>; [INV]
  3774. else
  3775. goto <bb 17>; [INV]
  3776. <bb 13> :
  3777. uxSchedulerSuspended.19_15 = uxSchedulerSuspended;
  3778. if (uxSchedulerSuspended.19_15 != 0)
  3779. goto <bb 14>; [INV]
  3780. else
  3781. goto <bb 16>; [INV]
  3782. <bb 14> :
  3783. vPortRaiseBASEPRI ();
  3784. <bb 15> :
  3785. goto <bb 15>; [INV]
  3786. <bb 16> :
  3787. _16 = 3758157060B;
  3788. *_16 = 268435456;
  3789. __asm__ __volatile__("dsb" : : : "memory");
  3790. __asm__ __volatile__("isb");
  3791. <bb 17> :
  3792. return;
  3793. }
  3794. prvAddNewTaskToReadyList (struct TCB_t * pxNewTCB)
  3795. {
  3796. struct ListItem_t * const pxIndex;
  3797. <bb 2> :
  3798. vPortEnterCritical ();
  3799. uxCurrentNumberOfTasks.2_1 = uxCurrentNumberOfTasks;
  3800. _2 = uxCurrentNumberOfTasks.2_1 + 1;
  3801. uxCurrentNumberOfTasks = _2;
  3802. pxCurrentTCB.3_3 = pxCurrentTCB;
  3803. if (pxCurrentTCB.3_3 == 0B)
  3804. goto <bb 3>; [INV]
  3805. else
  3806. goto <bb 5>; [INV]
  3807. <bb 3> :
  3808. pxCurrentTCB = pxNewTCB;
  3809. uxCurrentNumberOfTasks.4_4 = uxCurrentNumberOfTasks;
  3810. if (uxCurrentNumberOfTasks.4_4 == 1)
  3811. goto <bb 4>; [INV]
  3812. else
  3813. goto <bb 8>; [INV]
  3814. <bb 4> :
  3815. prvInitialiseTaskLists ();
  3816. goto <bb 8>; [INV]
  3817. <bb 5> :
  3818. xSchedulerRunning.5_5 = xSchedulerRunning;
  3819. if (xSchedulerRunning.5_5 == 0)
  3820. goto <bb 6>; [INV]
  3821. else
  3822. goto <bb 8>; [INV]
  3823. <bb 6> :
  3824. pxCurrentTCB.6_6 = pxCurrentTCB;
  3825. _7 = pxCurrentTCB.6_6->uxPriority;
  3826. _8 = pxNewTCB->uxPriority;
  3827. if (_7 <= _8)
  3828. goto <bb 7>; [INV]
  3829. else
  3830. goto <bb 8>; [INV]
  3831. <bb 7> :
  3832. pxCurrentTCB = pxNewTCB;
  3833. <bb 8> :
  3834. uxTaskNumber.7_9 = uxTaskNumber;
  3835. _10 = uxTaskNumber.7_9 + 1;
  3836. uxTaskNumber = _10;
  3837. uxTaskNumber.8_11 = uxTaskNumber;
  3838. pxNewTCB->uxTCBNumber = uxTaskNumber.8_11;
  3839. _12 = pxNewTCB->uxPriority;
  3840. uxTopReadyPriority.9_13 = uxTopReadyPriority;
  3841. if (_12 > uxTopReadyPriority.9_13)
  3842. goto <bb 9>; [INV]
  3843. else
  3844. goto <bb 10>; [INV]
  3845. <bb 9> :
  3846. _14 = pxNewTCB->uxPriority;
  3847. uxTopReadyPriority = _14;
  3848. <bb 10> :
  3849. _15 = pxNewTCB->uxPriority;
  3850. pxIndex = pxReadyTasksLists[_15].pxIndex;
  3851. pxNewTCB->xStateListItem.pxNext = pxIndex;
  3852. _16 = pxIndex->pxPrevious;
  3853. pxNewTCB->xStateListItem.pxPrevious = _16;
  3854. _17 = pxIndex->pxPrevious;
  3855. _18 = &pxNewTCB->xStateListItem;
  3856. _17->pxNext = _18;
  3857. _19 = &pxNewTCB->xStateListItem;
  3858. pxIndex->pxPrevious = _19;
  3859. _20 = pxNewTCB->uxPriority;
  3860. _21 = &pxReadyTasksLists[_20];
  3861. pxNewTCB->xStateListItem.pvContainer = _21;
  3862. _22 = pxNewTCB->uxPriority;
  3863. _23 = pxReadyTasksLists[_22].uxNumberOfItems;
  3864. _24 = _23 + 1;
  3865. pxReadyTasksLists[_22].uxNumberOfItems = _24;
  3866. vPortExitCritical ();
  3867. xSchedulerRunning.10_25 = xSchedulerRunning;
  3868. if (xSchedulerRunning.10_25 != 0)
  3869. goto <bb 11>; [INV]
  3870. else
  3871. goto <bb 13>; [INV]
  3872. <bb 11> :
  3873. pxCurrentTCB.11_26 = pxCurrentTCB;
  3874. _27 = pxCurrentTCB.11_26->uxPriority;
  3875. _28 = pxNewTCB->uxPriority;
  3876. if (_27 < _28)
  3877. goto <bb 12>; [INV]
  3878. else
  3879. goto <bb 13>; [INV]
  3880. <bb 12> :
  3881. _29 = 3758157060B;
  3882. *_29 = 268435456;
  3883. __asm__ __volatile__("dsb" : : : "memory");
  3884. __asm__ __volatile__("isb");
  3885. <bb 13> :
  3886. return;
  3887. }
  3888. prvInitialiseNewTask (void (*TaskFunction_t) (void *) pxTaskCode, const char * const pcName, const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, struct tskTaskControlBlock * * const pxCreatedTask, struct TCB_t * pxNewTCB, const struct MemoryRegion_t * const xRegions)
  3889. {
  3890. UBaseType_t x;
  3891. StackType_t * pxTopOfStack;
  3892. <bb 2> :
  3893. _1 = pxNewTCB->pxStack;
  3894. _2 = ulStackDepth * 4;
  3895. memset (_1, 165, _2);
  3896. _3 = pxNewTCB->pxStack;
  3897. _4 = ulStackDepth + 1073741823;
  3898. _5 = _4 * 4;
  3899. pxTopOfStack = _3 + _5;
  3900. pxTopOfStack.0_6 = (long unsigned int) pxTopOfStack;
  3901. _7 = pxTopOfStack.0_6 & 4294967288;
  3902. pxTopOfStack = (StackType_t *) _7;
  3903. pxTopOfStack.1_8 = (long unsigned int) pxTopOfStack;
  3904. _9 = pxTopOfStack.1_8 & 7;
  3905. if (_9 != 0)
  3906. goto <bb 3>; [INV]
  3907. else
  3908. goto <bb 5>; [INV]
  3909. <bb 3> :
  3910. vPortRaiseBASEPRI ();
  3911. <bb 4> :
  3912. goto <bb 4>; [INV]
  3913. <bb 5> :
  3914. pxNewTCB->pxEndOfStack = pxTopOfStack;
  3915. if (pcName != 0B)
  3916. goto <bb 6>; [INV]
  3917. else
  3918. goto <bb 12>; [INV]
  3919. <bb 6> :
  3920. x = 0;
  3921. goto <bb 10>; [INV]
  3922. <bb 7> :
  3923. _10 = pcName + x;
  3924. _11 = *_10;
  3925. pxNewTCB->pcTaskName[x] = _11;
  3926. _12 = pcName + x;
  3927. _13 = *_12;
  3928. if (_13 == 0)
  3929. goto <bb 8>; [INV]
  3930. else
  3931. goto <bb 9>; [INV]
  3932. <bb 8> :
  3933. goto <bb 11>; [INV]
  3934. <bb 9> :
  3935. x = x + 1;
  3936. <bb 10> :
  3937. if (x <= 9)
  3938. goto <bb 7>; [INV]
  3939. else
  3940. goto <bb 11>; [INV]
  3941. <bb 11> :
  3942. pxNewTCB->pcTaskName[9] = 0;
  3943. goto <bb 13>; [INV]
  3944. <bb 12> :
  3945. pxNewTCB->pcTaskName[0] = 0;
  3946. <bb 13> :
  3947. if (uxPriority > 4)
  3948. goto <bb 14>; [INV]
  3949. else
  3950. goto <bb 16>; [INV]
  3951. <bb 14> :
  3952. vPortRaiseBASEPRI ();
  3953. <bb 15> :
  3954. goto <bb 15>; [INV]
  3955. <bb 16> :
  3956. if (uxPriority > 4)
  3957. goto <bb 17>; [INV]
  3958. else
  3959. goto <bb 18>; [INV]
  3960. <bb 17> :
  3961. uxPriority = 4;
  3962. <bb 18> :
  3963. pxNewTCB->uxPriority = uxPriority;
  3964. pxNewTCB->uxBasePriority = uxPriority;
  3965. pxNewTCB->uxMutexesHeld = 0;
  3966. _14 = &pxNewTCB->xStateListItem;
  3967. vListInitialiseItem (_14);
  3968. _15 = &pxNewTCB->xEventListItem;
  3969. vListInitialiseItem (_15);
  3970. pxNewTCB->xStateListItem.pvOwner = pxNewTCB;
  3971. _16 = 5 - uxPriority;
  3972. pxNewTCB->xEventListItem.xItemValue = _16;
  3973. pxNewTCB->xEventListItem.pvOwner = pxNewTCB;
  3974. _17 = &pxNewTCB->ulNotifiedValue[0];
  3975. memset (_17, 0, 4);
  3976. _18 = &pxNewTCB->ucNotifyState[0];
  3977. memset (_18, 0, 1);
  3978. pxNewTCB->ucDelayAborted = 0;
  3979. _19 = pxPortInitialiseStack (pxTopOfStack, pxTaskCode, pvParameters);
  3980. pxNewTCB->pxTopOfStack = _19;
  3981. if (pxCreatedTask != 0B)
  3982. goto <bb 19>; [INV]
  3983. else
  3984. goto <bb 20>; [INV]
  3985. <bb 19> :
  3986. *pxCreatedTask = pxNewTCB;
  3987. <bb 20> :
  3988. return;
  3989. }
  3990. xTaskCreate (void (*TaskFunction_t) (void *) pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, struct tskTaskControlBlock * * const pxCreatedTask)
  3991. {
  3992. StackType_t * pxStack;
  3993. BaseType_t xReturn;
  3994. struct TCB_t * pxNewTCB;
  3995. BaseType_t D.7510;
  3996. <bb 2> :
  3997. _1 = (unsigned int) usStackDepth;
  3998. _2 = _1 * 4;
  3999. pxStack = pvPortMalloc (_2);
  4000. if (pxStack != 0B)
  4001. goto <bb 3>; [INV]
  4002. else
  4003. goto <bb 6>; [INV]
  4004. <bb 3> :
  4005. pxNewTCB = pvPortMalloc (92);
  4006. if (pxNewTCB != 0B)
  4007. goto <bb 4>; [INV]
  4008. else
  4009. goto <bb 5>; [INV]
  4010. <bb 4> :
  4011. pxNewTCB->pxStack = pxStack;
  4012. goto <bb 7>; [INV]
  4013. <bb 5> :
  4014. vPortFree (pxStack);
  4015. goto <bb 7>; [INV]
  4016. <bb 6> :
  4017. pxNewTCB = 0B;
  4018. <bb 7> :
  4019. if (pxNewTCB != 0B)
  4020. goto <bb 8>; [INV]
  4021. else
  4022. goto <bb 9>; [INV]
  4023. <bb 8> :
  4024. _3 = (long unsigned int) usStackDepth;
  4025. prvInitialiseNewTask (pxTaskCode, pcName, _3, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, 0B);
  4026. prvAddNewTaskToReadyList (pxNewTCB);
  4027. xReturn = 1;
  4028. goto <bb 10>; [INV]
  4029. <bb 9> :
  4030. xReturn = -1;
  4031. <bb 10> :
  4032. D.7510 = xReturn;
  4033. <bb 11> :
  4034. <L9>:
  4035. return D.7510;
  4036. }
  4037. __attribute__((always_inline))
  4038. vPortSetBASEPRI (uint32_t ulNewMaskValue)
  4039. {
  4040. <bb 2> :
  4041. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue : "memory");
  4042. return;
  4043. }
  4044. __attribute__((always_inline))
  4045. ulPortRaiseBASEPRI ()
  4046. {
  4047. uint32_t ulNewBASEPRI;
  4048. uint32_t ulOriginalBASEPRI;
  4049. uint32_t D.7635;
  4050. <bb 2> :
  4051. __asm__ __volatile__(" mrs %0, basepri
  4052. mov %1, %2
  4053. msr basepri, %1
  4054. isb
  4055. dsb
  4056. " : "=r" ulOriginalBASEPRI, "=r" ulNewBASEPRI : "i" 16 : "memory");
  4057. D.7635 = ulOriginalBASEPRI;
  4058. <bb 3> :
  4059. <L0>:
  4060. return D.7635;
  4061. }
  4062. __attribute__((always_inline))
  4063. vPortRaiseBASEPRI ()
  4064. {
  4065. uint32_t ulNewBASEPRI;
  4066. <bb 2> :
  4067. __asm__ __volatile__(" mov %0, %1
  4068. msr basepri, %0
  4069. isb
  4070. dsb
  4071. " : "=r" ulNewBASEPRI : "i" 16 : "memory");
  4072. return;
  4073. }