tasks.c.017i.build_ssa_passes 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987
  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.8222;
  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.8222 = ulReturn;
  98. <bb 6> :
  99. <L3>:
  100. return D.8222;
  101. }
  102. xTaskGenericNotifyStateClear (struct tskTaskControlBlock * xTask, UBaseType_t uxIndexToClear)
  103. {
  104. BaseType_t xReturn;
  105. struct TCB_t * pxTCB;
  106. BaseType_t D.8216;
  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.8216 = xReturn;
  144. <bb 12> :
  145. <L9>:
  146. return D.8216;
  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.8185;
  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.8185 = xReturn;
  481. <bb 39> :
  482. <L38>:
  483. return D.8185;
  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.8156;
  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.8156 = xReturn;
  649. <bb 34> :
  650. <L34>:
  651. return D.8156;
  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.8131;
  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.8131 = xReturn;
  727. <bb 14> :
  728. <L14>:
  729. return D.8131;
  730. }
  731. ulTaskGenericNotifyTake (UBaseType_t uxIndexToWait, BaseType_t xClearCountOnExit, TickType_t xTicksToWait)
  732. {
  733. uint32_t ulReturn;
  734. uint32_t D.8114;
  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.8114 = ulReturn;
  792. <bb 13> :
  793. <L15>:
  794. return D.8114;
  795. }
  796. pvTaskIncrementMutexHeldCount ()
  797. {
  798. struct tskTaskControlBlock * D.8098;
  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.8098 = pxCurrentTCB;
  812. <bb 5> :
  813. <L2>:
  814. return D.8098;
  815. }
  816. uxTaskResetEventItemValue ()
  817. {
  818. TickType_t uxReturn;
  819. TickType_t D.8094;
  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.8094 = uxReturn;
  829. <bb 3> :
  830. <L0>:
  831. return D.8094;
  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.8089;
  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.8089 = pcBuffer + x;
  932. <bb 6> :
  933. <L3>:
  934. return D.8089;
  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.8060;
  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.8060 = xReturn;
  1134. <bb 16> :
  1135. <L20>:
  1136. return D.8060;
  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.8040;
  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.8040 = xReturn;
  1233. <bb 16> :
  1234. <L20>:
  1235. return D.8040;
  1236. }
  1237. xTaskGetSchedulerState ()
  1238. {
  1239. BaseType_t xReturn;
  1240. BaseType_t D.8018;
  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.8018 = xReturn;
  1263. <bb 8> :
  1264. <L6>:
  1265. return D.8018;
  1266. }
  1267. xTaskGetCurrentTaskHandle ()
  1268. {
  1269. struct tskTaskControlBlock * xReturn;
  1270. struct tskTaskControlBlock * D.8010;
  1271. <bb 2> :
  1272. xReturn = pxCurrentTCB;
  1273. D.8010 = xReturn;
  1274. <bb 3> :
  1275. <L0>:
  1276. return D.8010;
  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.8005;
  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.8005 = uxReturn;
  1329. <bb 6> :
  1330. <L3>:
  1331. return D.8005;
  1332. }
  1333. prvTaskCheckFreeStackSpace (const uint8_t * pucStackByte)
  1334. {
  1335. uint32_t ulCount;
  1336. uint16_t D.7999;
  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.7999 = (uint16_t) ulCount;
  1352. <bb 6> :
  1353. <L3>:
  1354. return D.7999;
  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.7997;
  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.7997 = uxTask;
  1417. <bb 10> :
  1418. <L9>:
  1419. return D.7997;
  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.7966;
  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.7966 = uxReturn;
  1600. <bb 6> :
  1601. <L3>:
  1602. return D.7966;
  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.7961;
  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.7961 = xReturn;
  1695. <bb 19> :
  1696. <L19>:
  1697. return D.7961;
  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.7928;
  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.7928 = xReturn;
  1964. <bb 18> :
  1965. <L15>:
  1966. return D.7928;
  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.7895;
  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.7895 = xSwitchRequired;
  2319. <bb 30> :
  2320. <L35>:
  2321. return D.7895;
  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.7861;
  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.7861 = xReturn;
  2404. <bb 14> :
  2405. <L14>:
  2406. return D.7861;
  2407. }
  2408. xTaskCatchUpTicks (TickType_t xTicksToCatchUp)
  2409. {
  2410. BaseType_t xYieldOccurred;
  2411. BaseType_t D.7846;
  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.7846 = xYieldOccurred;
  2429. <bb 6> :
  2430. <L3>:
  2431. return D.7846;
  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.7842;
  2438. long unsigned int D.7838;
  2439. long unsigned int D.7837;
  2440. long unsigned int D.7836;
  2441. long unsigned int D.7835;
  2442. long unsigned int D.7834;
  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.7834 = prvListTasksWithinSingleList (_3, _4, 1);
  2458. uxTask = D.7834 + 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.7835 = prvListTasksWithinSingleList (_6, pxDelayedTaskList.55_7, 2);
  2468. uxTask = D.7835 + uxTask;
  2469. _8 = uxTask * 36;
  2470. _9 = pxTaskStatusArray + _8;
  2471. pxOverflowDelayedTaskList.56_10 = pxOverflowDelayedTaskList;
  2472. D.7836 = prvListTasksWithinSingleList (_9, pxOverflowDelayedTaskList.56_10, 2);
  2473. uxTask = D.7836 + uxTask;
  2474. _11 = uxTask * 36;
  2475. _12 = pxTaskStatusArray + _11;
  2476. D.7837 = prvListTasksWithinSingleList (_12, &xTasksWaitingTermination, 4);
  2477. uxTask = D.7837 + uxTask;
  2478. _13 = uxTask * 36;
  2479. _14 = pxTaskStatusArray + _13;
  2480. D.7838 = prvListTasksWithinSingleList (_14, &xSuspendedTaskList, 3);
  2481. uxTask = D.7838 + 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.7842 = uxTask;
  2491. <bb 7> :
  2492. <L7>:
  2493. return D.7842;
  2494. }
  2495. xTaskGetHandle (const char * pcNameToQuery)
  2496. {
  2497. struct TCB_t * pxTCB;
  2498. UBaseType_t uxQueue;
  2499. struct tskTaskControlBlock * D.7830;
  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.7830 = pxTCB;
  2561. <bb 18> :
  2562. <L15>:
  2563. return D.7830;
  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.7816;
  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.7816 = pxReturn;
  2670. <bb 22> :
  2671. <L22>:
  2672. return D.7816;
  2673. }
  2674. pcTaskGetName (struct tskTaskControlBlock * xTaskToQuery)
  2675. {
  2676. struct TCB_t * pxTCB;
  2677. char * D.7797;
  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.7797 = &pxTCB->pcTaskName[0];
  2701. <bb 9> :
  2702. <L6>:
  2703. return D.7797;
  2704. }
  2705. uxTaskGetNumberOfTasks ()
  2706. {
  2707. UBaseType_t D.7789;
  2708. <bb 2> :
  2709. D.7789 = uxCurrentNumberOfTasks;
  2710. <bb 3> :
  2711. <L0>:
  2712. return D.7789;
  2713. }
  2714. xTaskGetTickCountFromISR ()
  2715. {
  2716. UBaseType_t uxSavedInterruptStatus;
  2717. TickType_t xReturn;
  2718. TickType_t D.7787;
  2719. <bb 2> :
  2720. vPortValidateInterruptPriority ();
  2721. uxSavedInterruptStatus = 0;
  2722. xReturn = xTickCount;
  2723. D.7787 = xReturn;
  2724. <bb 3> :
  2725. <L0>:
  2726. return D.7787;
  2727. }
  2728. xTaskGetTickCount ()
  2729. {
  2730. TickType_t xTicks;
  2731. TickType_t D.7785;
  2732. <bb 2> :
  2733. xTicks = xTickCount;
  2734. D.7785 = xTicks;
  2735. <bb 3> :
  2736. <L0>:
  2737. return D.7785;
  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.7783;
  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.7783 = xAlreadyYielded;
  2910. <bb 27> :
  2911. <L33>:
  2912. return D.7783;
  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.7742;
  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.7742 = xYieldRequired;
  3048. <bb 14> :
  3049. <L14>:
  3050. return D.7742;
  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.7712;
  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.7712 = xReturn;
  3169. <bb 10> :
  3170. <L12>:
  3171. return D.7712;
  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.7631;
  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.7631 = uxReturn;
  3445. <bb 6> :
  3446. <L3>:
  3447. return D.7631;
  3448. }
  3449. uxTaskPriorityGet (struct tskTaskControlBlock * const xTask)
  3450. {
  3451. UBaseType_t uxReturn;
  3452. const struct TCB_t * pxTCB;
  3453. UBaseType_t D.7625;
  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.7625 = uxReturn;
  3471. <bb 6> :
  3472. <L3>:
  3473. return D.7625;
  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.7619;
  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.7619 = eReturn;
  3574. <bb 24> :
  3575. <L25>:
  3576. return D.7619;
  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.7588;
  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.7588 = xShouldDelay;
  3709. <bb 23> :
  3710. <L26>:
  3711. return D.7588;
  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. if (pcName != 0B)
  3915. goto <bb 6>; [INV]
  3916. else
  3917. goto <bb 12>; [INV]
  3918. <bb 6> :
  3919. x = 0;
  3920. goto <bb 10>; [INV]
  3921. <bb 7> :
  3922. _10 = pcName + x;
  3923. _11 = *_10;
  3924. pxNewTCB->pcTaskName[x] = _11;
  3925. _12 = pcName + x;
  3926. _13 = *_12;
  3927. if (_13 == 0)
  3928. goto <bb 8>; [INV]
  3929. else
  3930. goto <bb 9>; [INV]
  3931. <bb 8> :
  3932. goto <bb 11>; [INV]
  3933. <bb 9> :
  3934. x = x + 1;
  3935. <bb 10> :
  3936. if (x <= 9)
  3937. goto <bb 7>; [INV]
  3938. else
  3939. goto <bb 11>; [INV]
  3940. <bb 11> :
  3941. pxNewTCB->pcTaskName[9] = 0;
  3942. goto <bb 13>; [INV]
  3943. <bb 12> :
  3944. pxNewTCB->pcTaskName[0] = 0;
  3945. <bb 13> :
  3946. if (uxPriority > 4)
  3947. goto <bb 14>; [INV]
  3948. else
  3949. goto <bb 16>; [INV]
  3950. <bb 14> :
  3951. vPortRaiseBASEPRI ();
  3952. <bb 15> :
  3953. goto <bb 15>; [INV]
  3954. <bb 16> :
  3955. if (uxPriority > 4)
  3956. goto <bb 17>; [INV]
  3957. else
  3958. goto <bb 18>; [INV]
  3959. <bb 17> :
  3960. uxPriority = 4;
  3961. <bb 18> :
  3962. pxNewTCB->uxPriority = uxPriority;
  3963. pxNewTCB->uxBasePriority = uxPriority;
  3964. pxNewTCB->uxMutexesHeld = 0;
  3965. _14 = &pxNewTCB->xStateListItem;
  3966. vListInitialiseItem (_14);
  3967. _15 = &pxNewTCB->xEventListItem;
  3968. vListInitialiseItem (_15);
  3969. pxNewTCB->xStateListItem.pvOwner = pxNewTCB;
  3970. _16 = 5 - uxPriority;
  3971. pxNewTCB->xEventListItem.xItemValue = _16;
  3972. pxNewTCB->xEventListItem.pvOwner = pxNewTCB;
  3973. _17 = &pxNewTCB->ulNotifiedValue[0];
  3974. memset (_17, 0, 4);
  3975. _18 = &pxNewTCB->ucNotifyState[0];
  3976. memset (_18, 0, 1);
  3977. pxNewTCB->ucDelayAborted = 0;
  3978. _19 = pxPortInitialiseStack (pxTopOfStack, pxTaskCode, pvParameters);
  3979. pxNewTCB->pxTopOfStack = _19;
  3980. if (pxCreatedTask != 0B)
  3981. goto <bb 19>; [INV]
  3982. else
  3983. goto <bb 20>; [INV]
  3984. <bb 19> :
  3985. *pxCreatedTask = pxNewTCB;
  3986. <bb 20> :
  3987. return;
  3988. }
  3989. xTaskCreate (void (*TaskFunction_t) (void *) pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, struct tskTaskControlBlock * * const pxCreatedTask)
  3990. {
  3991. StackType_t * pxStack;
  3992. BaseType_t xReturn;
  3993. struct TCB_t * pxNewTCB;
  3994. BaseType_t D.7508;
  3995. <bb 2> :
  3996. _1 = (unsigned int) usStackDepth;
  3997. _2 = _1 * 4;
  3998. pxStack = pvPortMalloc (_2);
  3999. if (pxStack != 0B)
  4000. goto <bb 3>; [INV]
  4001. else
  4002. goto <bb 6>; [INV]
  4003. <bb 3> :
  4004. pxNewTCB = pvPortMalloc (88);
  4005. if (pxNewTCB != 0B)
  4006. goto <bb 4>; [INV]
  4007. else
  4008. goto <bb 5>; [INV]
  4009. <bb 4> :
  4010. pxNewTCB->pxStack = pxStack;
  4011. goto <bb 7>; [INV]
  4012. <bb 5> :
  4013. vPortFree (pxStack);
  4014. goto <bb 7>; [INV]
  4015. <bb 6> :
  4016. pxNewTCB = 0B;
  4017. <bb 7> :
  4018. if (pxNewTCB != 0B)
  4019. goto <bb 8>; [INV]
  4020. else
  4021. goto <bb 9>; [INV]
  4022. <bb 8> :
  4023. _3 = (long unsigned int) usStackDepth;
  4024. prvInitialiseNewTask (pxTaskCode, pcName, _3, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, 0B);
  4025. prvAddNewTaskToReadyList (pxNewTCB);
  4026. xReturn = 1;
  4027. goto <bb 10>; [INV]
  4028. <bb 9> :
  4029. xReturn = -1;
  4030. <bb 10> :
  4031. D.7508 = xReturn;
  4032. <bb 11> :
  4033. <L9>:
  4034. return D.7508;
  4035. }
  4036. __attribute__((always_inline))
  4037. vPortSetBASEPRI (uint32_t ulNewMaskValue)
  4038. {
  4039. <bb 2> :
  4040. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue : "memory");
  4041. return;
  4042. }
  4043. __attribute__((always_inline))
  4044. ulPortRaiseBASEPRI ()
  4045. {
  4046. uint32_t ulNewBASEPRI;
  4047. uint32_t ulOriginalBASEPRI;
  4048. uint32_t D.7633;
  4049. <bb 2> :
  4050. __asm__ __volatile__(" mrs %0, basepri
  4051. mov %1, %2
  4052. msr basepri, %1
  4053. isb
  4054. dsb
  4055. " : "=r" ulOriginalBASEPRI, "=r" ulNewBASEPRI : "i" 16 : "memory");
  4056. D.7633 = ulOriginalBASEPRI;
  4057. <bb 3> :
  4058. <L0>:
  4059. return D.7633;
  4060. }
  4061. __attribute__((always_inline))
  4062. vPortRaiseBASEPRI ()
  4063. {
  4064. uint32_t ulNewBASEPRI;
  4065. <bb 2> :
  4066. __asm__ __volatile__(" mov %0, %1
  4067. msr basepri, %0
  4068. isb
  4069. dsb
  4070. " : "=r" ulNewBASEPRI : "i" 16 : "memory");
  4071. return;
  4072. }