tasks.c.022i.opt_local_passes 131 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914
  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. struct TCB_t * pxCurrentTCB.152_1;
  7. struct TCB_t * pxCurrentTCB.153_2;
  8. struct ListItem_t * _3;
  9. long unsigned int _4;
  10. struct TCB_t * pxCurrentTCB.154_5;
  11. struct TCB_t * pxCurrentTCB.155_6;
  12. struct xLIST_ITEM * _7;
  13. struct TCB_t * pxCurrentTCB.156_8;
  14. struct xLIST_ITEM * _9;
  15. struct ListItem_t * _10;
  16. struct TCB_t * pxCurrentTCB.157_11;
  17. struct ListItem_t * _12;
  18. struct TCB_t * pxCurrentTCB.158_13;
  19. long unsigned int _14;
  20. long unsigned int _15;
  21. struct TCB_t * pxCurrentTCB.159_16;
  22. struct List_t * pxOverflowDelayedTaskList.160_17;
  23. struct TCB_t * pxCurrentTCB.161_18;
  24. struct ListItem_t * _19;
  25. struct List_t * pxDelayedTaskList.162_20;
  26. struct TCB_t * pxCurrentTCB.163_21;
  27. struct ListItem_t * _22;
  28. long unsigned int xNextTaskUnblockTime.164_23;
  29. <bb 2> :
  30. xConstTickCount_26 ={v} xTickCount;
  31. pxCurrentTCB.152_1 ={v} pxCurrentTCB;
  32. pxCurrentTCB.152_1->ucDelayAborted = 0;
  33. pxCurrentTCB.153_2 ={v} pxCurrentTCB;
  34. _3 = &pxCurrentTCB.153_2->xStateListItem;
  35. _4 = uxListRemove (_3);
  36. <bb 3> :
  37. if (xTicksToWait_29(D) == 4294967295)
  38. goto <bb 4>; [INV]
  39. else
  40. goto <bb 6>; [INV]
  41. <bb 4> :
  42. if (xCanBlockIndefinitely_30(D) != 0)
  43. goto <bb 5>; [INV]
  44. else
  45. goto <bb 6>; [INV]
  46. <bb 5> :
  47. pxIndex_31 = xSuspendedTaskList.pxIndex;
  48. pxCurrentTCB.154_5 ={v} pxCurrentTCB;
  49. pxCurrentTCB.154_5->xStateListItem.pxNext = pxIndex_31;
  50. pxCurrentTCB.155_6 ={v} pxCurrentTCB;
  51. _7 = pxIndex_31->pxPrevious;
  52. pxCurrentTCB.155_6->xStateListItem.pxPrevious = _7;
  53. pxCurrentTCB.156_8 ={v} pxCurrentTCB;
  54. _9 = pxIndex_31->pxPrevious;
  55. _10 = &pxCurrentTCB.156_8->xStateListItem;
  56. _9->pxNext = _10;
  57. pxCurrentTCB.157_11 ={v} pxCurrentTCB;
  58. _12 = &pxCurrentTCB.157_11->xStateListItem;
  59. pxIndex_31->pxPrevious = _12;
  60. pxCurrentTCB.158_13 ={v} pxCurrentTCB;
  61. pxCurrentTCB.158_13->xStateListItem.pvContainer = &xSuspendedTaskList;
  62. _14 ={v} xSuspendedTaskList.uxNumberOfItems;
  63. _15 = _14 + 1;
  64. xSuspendedTaskList.uxNumberOfItems ={v} _15;
  65. goto <bb 10>; [INV]
  66. <bb 6> :
  67. xTimeToWake_38 = xConstTickCount_26 + xTicksToWait_29(D);
  68. pxCurrentTCB.159_16 ={v} pxCurrentTCB;
  69. pxCurrentTCB.159_16->xStateListItem.xItemValue = xTimeToWake_38;
  70. if (xTimeToWake_38 < xConstTickCount_26)
  71. goto <bb 7>; [INV]
  72. else
  73. goto <bb 8>; [INV]
  74. <bb 7> :
  75. pxOverflowDelayedTaskList.160_17 ={v} pxOverflowDelayedTaskList;
  76. pxCurrentTCB.161_18 ={v} pxCurrentTCB;
  77. _19 = &pxCurrentTCB.161_18->xStateListItem;
  78. vListInsert (pxOverflowDelayedTaskList.160_17, _19);
  79. goto <bb 10>; [INV]
  80. <bb 8> :
  81. pxDelayedTaskList.162_20 ={v} pxDelayedTaskList;
  82. pxCurrentTCB.163_21 ={v} pxCurrentTCB;
  83. _22 = &pxCurrentTCB.163_21->xStateListItem;
  84. vListInsert (pxDelayedTaskList.162_20, _22);
  85. xNextTaskUnblockTime.164_23 ={v} xNextTaskUnblockTime;
  86. if (xTimeToWake_38 < xNextTaskUnblockTime.164_23)
  87. goto <bb 9>; [INV]
  88. else
  89. goto <bb 10>; [INV]
  90. <bb 9> :
  91. xNextTaskUnblockTime ={v} xTimeToWake_38;
  92. <bb 10> :
  93. return;
  94. }
  95. ulTaskGenericNotifyValueClear (struct tskTaskControlBlock * xTask, UBaseType_t uxIndexToClear, uint32_t ulBitsToClear)
  96. {
  97. uint32_t ulReturn;
  98. struct TCB_t * pxTCB;
  99. uint32_t D.8224;
  100. struct TCB_t * iftmp.151;
  101. long unsigned int _1;
  102. long unsigned int _2;
  103. long unsigned int _3;
  104. struct TCB_t * iftmp.151_4;
  105. struct TCB_t * iftmp.151_6;
  106. struct TCB_t * iftmp.151_8;
  107. uint32_t _16;
  108. <bb 2> :
  109. if (xTask_5(D) == 0B)
  110. goto <bb 3>; [INV]
  111. else
  112. goto <bb 4>; [INV]
  113. <bb 3> :
  114. iftmp.151_8 ={v} pxCurrentTCB;
  115. goto <bb 5>; [INV]
  116. <bb 4> :
  117. iftmp.151_6 = xTask_5(D);
  118. <bb 5> :
  119. # iftmp.151_4 = PHI <iftmp.151_8(3), iftmp.151_6(4)>
  120. pxTCB_9 = iftmp.151_4;
  121. vPortEnterCritical ();
  122. ulReturn_12 ={v} pxTCB_9->ulNotifiedValue[uxIndexToClear_11(D)];
  123. _1 ={v} pxTCB_9->ulNotifiedValue[uxIndexToClear_11(D)];
  124. _2 = ~ulBitsToClear_13(D);
  125. _3 = _1 & _2;
  126. pxTCB_9->ulNotifiedValue[uxIndexToClear_11(D)] ={v} _3;
  127. vPortExitCritical ();
  128. _16 = ulReturn_12;
  129. <bb 6> :
  130. <L3>:
  131. return _16;
  132. }
  133. xTaskGenericNotifyStateClear (struct tskTaskControlBlock * xTask, UBaseType_t uxIndexToClear)
  134. {
  135. BaseType_t xReturn;
  136. struct TCB_t * pxTCB;
  137. BaseType_t D.8218;
  138. struct TCB_t * iftmp.150;
  139. unsigned char _1;
  140. struct TCB_t * iftmp.150_3;
  141. struct TCB_t * iftmp.150_7;
  142. struct TCB_t * iftmp.150_9;
  143. BaseType_t _16;
  144. <bb 2> :
  145. if (uxIndexToClear_5(D) != 0)
  146. goto <bb 3>; [INV]
  147. else
  148. goto <bb 5>; [INV]
  149. <bb 3> :
  150. vPortRaiseBASEPRI ();
  151. <bb 4> :
  152. goto <bb 4>; [INV]
  153. <bb 5> :
  154. if (xTask_6(D) == 0B)
  155. goto <bb 6>; [INV]
  156. else
  157. goto <bb 7>; [INV]
  158. <bb 6> :
  159. iftmp.150_9 ={v} pxCurrentTCB;
  160. goto <bb 8>; [INV]
  161. <bb 7> :
  162. iftmp.150_7 = xTask_6(D);
  163. <bb 8> :
  164. # iftmp.150_3 = PHI <iftmp.150_9(6), iftmp.150_7(7)>
  165. pxTCB_10 = iftmp.150_3;
  166. vPortEnterCritical ();
  167. _1 ={v} pxTCB_10->ucNotifyState[uxIndexToClear_5(D)];
  168. if (_1 == 2)
  169. goto <bb 9>; [INV]
  170. else
  171. goto <bb 10>; [INV]
  172. <bb 9> :
  173. pxTCB_10->ucNotifyState[uxIndexToClear_5(D)] ={v} 0;
  174. xReturn_14 = 1;
  175. goto <bb 11>; [INV]
  176. <bb 10> :
  177. xReturn_12 = 0;
  178. <bb 11> :
  179. # xReturn_2 = PHI <xReturn_14(9), xReturn_12(10)>
  180. vPortExitCritical ();
  181. _16 = xReturn_2;
  182. <bb 12> :
  183. <L9>:
  184. return _16;
  185. }
  186. vTaskGenericNotifyGiveFromISR (struct tskTaskControlBlock * xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t * pxHigherPriorityTaskWoken)
  187. {
  188. struct ListItem_t * const pxIndex;
  189. struct ListItem_t * const pxIndex;
  190. struct List_t * const pxList;
  191. UBaseType_t uxSavedInterruptStatus;
  192. uint8_t ucOriginalNotifyState;
  193. struct TCB_t * pxTCB;
  194. long unsigned int _1;
  195. long unsigned int _2;
  196. struct xLIST * _3;
  197. long unsigned int uxSchedulerSuspended.147_4;
  198. struct xLIST_ITEM * _5;
  199. struct xLIST_ITEM * _6;
  200. struct xLIST_ITEM * _7;
  201. struct xLIST_ITEM * _8;
  202. struct ListItem_t * _9;
  203. struct ListItem_t * _10;
  204. struct xLIST_ITEM * _11;
  205. long unsigned int _12;
  206. long unsigned int _13;
  207. long unsigned int _14;
  208. long unsigned int uxTopReadyPriority.148_15;
  209. long unsigned int _16;
  210. long unsigned int _17;
  211. struct xLIST_ITEM * _18;
  212. struct xLIST_ITEM * _19;
  213. struct ListItem_t * _20;
  214. struct ListItem_t * _21;
  215. long unsigned int _22;
  216. struct List_t * _23;
  217. long unsigned int _24;
  218. long unsigned int _25;
  219. long unsigned int _26;
  220. struct xLIST_ITEM * _27;
  221. struct xLIST_ITEM * _28;
  222. struct ListItem_t * _29;
  223. struct ListItem_t * _30;
  224. long unsigned int _31;
  225. long unsigned int _32;
  226. long unsigned int _33;
  227. struct TCB_t * pxCurrentTCB.149_34;
  228. long unsigned int _35;
  229. <bb 2> :
  230. if (xTaskToNotify_41(D) == 0B)
  231. goto <bb 3>; [INV]
  232. else
  233. goto <bb 5>; [INV]
  234. <bb 3> :
  235. vPortRaiseBASEPRI ();
  236. <bb 4> :
  237. goto <bb 4>; [INV]
  238. <bb 5> :
  239. if (uxIndexToNotify_42(D) != 0)
  240. goto <bb 6>; [INV]
  241. else
  242. goto <bb 8>; [INV]
  243. <bb 6> :
  244. vPortRaiseBASEPRI ();
  245. <bb 7> :
  246. goto <bb 7>; [INV]
  247. <bb 8> :
  248. vPortValidateInterruptPriority ();
  249. pxTCB_45 = xTaskToNotify_41(D);
  250. uxSavedInterruptStatus_47 = ulPortRaiseBASEPRI ();
  251. ucOriginalNotifyState_48 ={v} pxTCB_45->ucNotifyState[uxIndexToNotify_42(D)];
  252. pxTCB_45->ucNotifyState[uxIndexToNotify_42(D)] ={v} 2;
  253. _1 ={v} pxTCB_45->ulNotifiedValue[uxIndexToNotify_42(D)];
  254. _2 = _1 + 1;
  255. pxTCB_45->ulNotifiedValue[uxIndexToNotify_42(D)] ={v} _2;
  256. if (ucOriginalNotifyState_48 == 1)
  257. goto <bb 9>; [INV]
  258. else
  259. goto <bb 23>; [INV]
  260. <bb 9> :
  261. _3 = pxTCB_45->xEventListItem.pvContainer;
  262. if (_3 != 0B)
  263. goto <bb 10>; [INV]
  264. else
  265. goto <bb 12>; [INV]
  266. <bb 10> :
  267. vPortRaiseBASEPRI ();
  268. <bb 11> :
  269. goto <bb 11>; [INV]
  270. <bb 12> :
  271. uxSchedulerSuspended.147_4 ={v} uxSchedulerSuspended;
  272. if (uxSchedulerSuspended.147_4 == 0)
  273. goto <bb 13>; [INV]
  274. else
  275. goto <bb 18>; [INV]
  276. <bb 13> :
  277. pxList_58 = pxTCB_45->xStateListItem.pvContainer;
  278. _5 = pxTCB_45->xStateListItem.pxNext;
  279. _6 = pxTCB_45->xStateListItem.pxPrevious;
  280. _5->pxPrevious = _6;
  281. _7 = pxTCB_45->xStateListItem.pxPrevious;
  282. _8 = pxTCB_45->xStateListItem.pxNext;
  283. _7->pxNext = _8;
  284. _9 = pxList_58->pxIndex;
  285. _10 = &pxTCB_45->xStateListItem;
  286. if (_9 == _10)
  287. goto <bb 14>; [INV]
  288. else
  289. goto <bb 15>; [INV]
  290. <bb 14> :
  291. _11 = pxTCB_45->xStateListItem.pxPrevious;
  292. pxList_58->pxIndex = _11;
  293. <bb 15> :
  294. pxTCB_45->xStateListItem.pvContainer = 0B;
  295. _12 ={v} pxList_58->uxNumberOfItems;
  296. _13 = _12 + 4294967295;
  297. pxList_58->uxNumberOfItems ={v} _13;
  298. _14 = pxTCB_45->uxPriority;
  299. uxTopReadyPriority.148_15 ={v} uxTopReadyPriority;
  300. if (_14 > uxTopReadyPriority.148_15)
  301. goto <bb 16>; [INV]
  302. else
  303. goto <bb 17>; [INV]
  304. <bb 16> :
  305. _16 = pxTCB_45->uxPriority;
  306. uxTopReadyPriority ={v} _16;
  307. <bb 17> :
  308. _17 = pxTCB_45->uxPriority;
  309. pxIndex_65 = pxReadyTasksLists[_17].pxIndex;
  310. pxTCB_45->xStateListItem.pxNext = pxIndex_65;
  311. _18 = pxIndex_65->pxPrevious;
  312. pxTCB_45->xStateListItem.pxPrevious = _18;
  313. _19 = pxIndex_65->pxPrevious;
  314. _20 = &pxTCB_45->xStateListItem;
  315. _19->pxNext = _20;
  316. _21 = &pxTCB_45->xStateListItem;
  317. pxIndex_65->pxPrevious = _21;
  318. _22 = pxTCB_45->uxPriority;
  319. _23 = &pxReadyTasksLists[_22];
  320. pxTCB_45->xStateListItem.pvContainer = _23;
  321. _24 = pxTCB_45->uxPriority;
  322. _25 ={v} pxReadyTasksLists[_24].uxNumberOfItems;
  323. _26 = _25 + 1;
  324. pxReadyTasksLists[_24].uxNumberOfItems ={v} _26;
  325. goto <bb 19>; [INV]
  326. <bb 18> :
  327. pxIndex_51 = xPendingReadyList.pxIndex;
  328. pxTCB_45->xEventListItem.pxNext = pxIndex_51;
  329. _27 = pxIndex_51->pxPrevious;
  330. pxTCB_45->xEventListItem.pxPrevious = _27;
  331. _28 = pxIndex_51->pxPrevious;
  332. _29 = &pxTCB_45->xEventListItem;
  333. _28->pxNext = _29;
  334. _30 = &pxTCB_45->xEventListItem;
  335. pxIndex_51->pxPrevious = _30;
  336. pxTCB_45->xEventListItem.pvContainer = &xPendingReadyList;
  337. _31 ={v} xPendingReadyList.uxNumberOfItems;
  338. _32 = _31 + 1;
  339. xPendingReadyList.uxNumberOfItems ={v} _32;
  340. <bb 19> :
  341. _33 = pxTCB_45->uxPriority;
  342. pxCurrentTCB.149_34 ={v} pxCurrentTCB;
  343. _35 = pxCurrentTCB.149_34->uxPriority;
  344. if (_33 > _35)
  345. goto <bb 20>; [INV]
  346. else
  347. goto <bb 23>; [INV]
  348. <bb 20> :
  349. if (pxHigherPriorityTaskWoken_72(D) != 0B)
  350. goto <bb 21>; [INV]
  351. else
  352. goto <bb 22>; [INV]
  353. <bb 21> :
  354. *pxHigherPriorityTaskWoken_72(D) = 1;
  355. <bb 22> :
  356. xYieldPending ={v} 1;
  357. <bb 23> :
  358. vPortSetBASEPRI (uxSavedInterruptStatus_47);
  359. return;
  360. }
  361. xTaskGenericNotifyFromISR (struct tskTaskControlBlock * xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t * pulPreviousNotificationValue, BaseType_t * pxHigherPriorityTaskWoken)
  362. {
  363. struct ListItem_t * const pxIndex;
  364. struct ListItem_t * const pxIndex;
  365. struct List_t * const pxList;
  366. UBaseType_t uxSavedInterruptStatus;
  367. BaseType_t xReturn;
  368. uint8_t ucOriginalNotifyState;
  369. struct TCB_t * pxTCB;
  370. BaseType_t D.8187;
  371. long unsigned int _1;
  372. long unsigned int _2;
  373. long unsigned int _3;
  374. long unsigned int _4;
  375. long unsigned int _5;
  376. long unsigned int xTickCount.143_6;
  377. struct xLIST * _7;
  378. long unsigned int uxSchedulerSuspended.144_8;
  379. struct xLIST_ITEM * _9;
  380. struct xLIST_ITEM * _10;
  381. struct xLIST_ITEM * _11;
  382. struct xLIST_ITEM * _12;
  383. struct ListItem_t * _13;
  384. struct ListItem_t * _14;
  385. struct xLIST_ITEM * _15;
  386. long unsigned int _16;
  387. long unsigned int _17;
  388. long unsigned int _18;
  389. long unsigned int uxTopReadyPriority.145_19;
  390. long unsigned int _20;
  391. long unsigned int _21;
  392. struct xLIST_ITEM * _22;
  393. struct xLIST_ITEM * _23;
  394. struct ListItem_t * _24;
  395. struct ListItem_t * _25;
  396. long unsigned int _26;
  397. struct List_t * _27;
  398. long unsigned int _28;
  399. long unsigned int _29;
  400. long unsigned int _30;
  401. struct xLIST_ITEM * _31;
  402. struct xLIST_ITEM * _32;
  403. struct ListItem_t * _33;
  404. struct ListItem_t * _34;
  405. long unsigned int _35;
  406. long unsigned int _36;
  407. long unsigned int _37;
  408. struct TCB_t * pxCurrentTCB.146_38;
  409. long unsigned int _39;
  410. BaseType_t _96;
  411. <bb 2> :
  412. xReturn_50 = 1;
  413. if (xTaskToNotify_51(D) == 0B)
  414. goto <bb 3>; [INV]
  415. else
  416. goto <bb 5>; [INV]
  417. <bb 3> :
  418. vPortRaiseBASEPRI ();
  419. <bb 4> :
  420. goto <bb 4>; [INV]
  421. <bb 5> :
  422. if (uxIndexToNotify_52(D) != 0)
  423. goto <bb 6>; [INV]
  424. else
  425. goto <bb 8>; [INV]
  426. <bb 6> :
  427. vPortRaiseBASEPRI ();
  428. <bb 7> :
  429. goto <bb 7>; [INV]
  430. <bb 8> :
  431. vPortValidateInterruptPriority ();
  432. pxTCB_55 = xTaskToNotify_51(D);
  433. uxSavedInterruptStatus_57 = ulPortRaiseBASEPRI ();
  434. if (pulPreviousNotificationValue_58(D) != 0B)
  435. goto <bb 9>; [INV]
  436. else
  437. goto <bb 10>; [INV]
  438. <bb 9> :
  439. _1 ={v} pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)];
  440. *pulPreviousNotificationValue_58(D) = _1;
  441. <bb 10> :
  442. ucOriginalNotifyState_60 ={v} pxTCB_55->ucNotifyState[uxIndexToNotify_52(D)];
  443. pxTCB_55->ucNotifyState[uxIndexToNotify_52(D)] ={v} 2;
  444. switch (eAction_62(D)) <default: <L16> [INV], case 0: <L15> [INV], case 1: <L8> [INV], case 2: <L9> [INV], case 3: <L10> [INV], case 4: <L11> [INV]>
  445. <bb 11> :
  446. <L8>:
  447. _2 ={v} pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)];
  448. _3 = ulValue_64(D) | _2;
  449. pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)] ={v} _3;
  450. goto <bb 23>; [INV]
  451. <bb 12> :
  452. <L9>:
  453. _4 ={v} pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)];
  454. _5 = _4 + 1;
  455. pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)] ={v} _5;
  456. goto <bb 23>; [INV]
  457. <bb 13> :
  458. <L10>:
  459. pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)] ={v} ulValue_64(D);
  460. goto <bb 23>; [INV]
  461. <bb 14> :
  462. <L11>:
  463. if (ucOriginalNotifyState_60 != 2)
  464. goto <bb 15>; [INV]
  465. else
  466. goto <bb 16>; [INV]
  467. <bb 15> :
  468. pxTCB_55->ulNotifiedValue[uxIndexToNotify_52(D)] ={v} ulValue_64(D);
  469. goto <bb 17>; [INV]
  470. <bb 16> :
  471. xReturn_63 = 0;
  472. <bb 17> :
  473. # xReturn_40 = PHI <xReturn_50(15), xReturn_63(16)>
  474. goto <bb 23>; [INV]
  475. <bb 18> :
  476. <L15>:
  477. goto <bb 23>; [INV]
  478. <bb 19> :
  479. <L16>:
  480. xTickCount.143_6 ={v} xTickCount;
  481. if (xTickCount.143_6 != 0)
  482. goto <bb 20>; [INV]
  483. else
  484. goto <bb 22>; [INV]
  485. <bb 20> :
  486. vPortRaiseBASEPRI ();
  487. <bb 21> :
  488. goto <bb 21>; [INV]
  489. <bb 22> :
  490. <bb 23> :
  491. # xReturn_41 = PHI <xReturn_50(11), xReturn_50(12), xReturn_50(13), xReturn_40(17), xReturn_50(18), xReturn_50(22)>
  492. if (ucOriginalNotifyState_60 == 1)
  493. goto <bb 24>; [INV]
  494. else
  495. goto <bb 38>; [INV]
  496. <bb 24> :
  497. _7 = pxTCB_55->xEventListItem.pvContainer;
  498. if (_7 != 0B)
  499. goto <bb 25>; [INV]
  500. else
  501. goto <bb 27>; [INV]
  502. <bb 25> :
  503. vPortRaiseBASEPRI ();
  504. <bb 26> :
  505. goto <bb 26>; [INV]
  506. <bb 27> :
  507. uxSchedulerSuspended.144_8 ={v} uxSchedulerSuspended;
  508. if (uxSchedulerSuspended.144_8 == 0)
  509. goto <bb 28>; [INV]
  510. else
  511. goto <bb 33>; [INV]
  512. <bb 28> :
  513. pxList_77 = pxTCB_55->xStateListItem.pvContainer;
  514. _9 = pxTCB_55->xStateListItem.pxNext;
  515. _10 = pxTCB_55->xStateListItem.pxPrevious;
  516. _9->pxPrevious = _10;
  517. _11 = pxTCB_55->xStateListItem.pxPrevious;
  518. _12 = pxTCB_55->xStateListItem.pxNext;
  519. _11->pxNext = _12;
  520. _13 = pxList_77->pxIndex;
  521. _14 = &pxTCB_55->xStateListItem;
  522. if (_13 == _14)
  523. goto <bb 29>; [INV]
  524. else
  525. goto <bb 30>; [INV]
  526. <bb 29> :
  527. _15 = pxTCB_55->xStateListItem.pxPrevious;
  528. pxList_77->pxIndex = _15;
  529. <bb 30> :
  530. pxTCB_55->xStateListItem.pvContainer = 0B;
  531. _16 ={v} pxList_77->uxNumberOfItems;
  532. _17 = _16 + 4294967295;
  533. pxList_77->uxNumberOfItems ={v} _17;
  534. _18 = pxTCB_55->uxPriority;
  535. uxTopReadyPriority.145_19 ={v} uxTopReadyPriority;
  536. if (_18 > uxTopReadyPriority.145_19)
  537. goto <bb 31>; [INV]
  538. else
  539. goto <bb 32>; [INV]
  540. <bb 31> :
  541. _20 = pxTCB_55->uxPriority;
  542. uxTopReadyPriority ={v} _20;
  543. <bb 32> :
  544. _21 = pxTCB_55->uxPriority;
  545. pxIndex_84 = pxReadyTasksLists[_21].pxIndex;
  546. pxTCB_55->xStateListItem.pxNext = pxIndex_84;
  547. _22 = pxIndex_84->pxPrevious;
  548. pxTCB_55->xStateListItem.pxPrevious = _22;
  549. _23 = pxIndex_84->pxPrevious;
  550. _24 = &pxTCB_55->xStateListItem;
  551. _23->pxNext = _24;
  552. _25 = &pxTCB_55->xStateListItem;
  553. pxIndex_84->pxPrevious = _25;
  554. _26 = pxTCB_55->uxPriority;
  555. _27 = &pxReadyTasksLists[_26];
  556. pxTCB_55->xStateListItem.pvContainer = _27;
  557. _28 = pxTCB_55->uxPriority;
  558. _29 ={v} pxReadyTasksLists[_28].uxNumberOfItems;
  559. _30 = _29 + 1;
  560. pxReadyTasksLists[_28].uxNumberOfItems ={v} _30;
  561. goto <bb 34>; [INV]
  562. <bb 33> :
  563. pxIndex_70 = xPendingReadyList.pxIndex;
  564. pxTCB_55->xEventListItem.pxNext = pxIndex_70;
  565. _31 = pxIndex_70->pxPrevious;
  566. pxTCB_55->xEventListItem.pxPrevious = _31;
  567. _32 = pxIndex_70->pxPrevious;
  568. _33 = &pxTCB_55->xEventListItem;
  569. _32->pxNext = _33;
  570. _34 = &pxTCB_55->xEventListItem;
  571. pxIndex_70->pxPrevious = _34;
  572. pxTCB_55->xEventListItem.pvContainer = &xPendingReadyList;
  573. _35 ={v} xPendingReadyList.uxNumberOfItems;
  574. _36 = _35 + 1;
  575. xPendingReadyList.uxNumberOfItems ={v} _36;
  576. <bb 34> :
  577. _37 = pxTCB_55->uxPriority;
  578. pxCurrentTCB.146_38 ={v} pxCurrentTCB;
  579. _39 = pxCurrentTCB.146_38->uxPriority;
  580. if (_37 > _39)
  581. goto <bb 35>; [INV]
  582. else
  583. goto <bb 38>; [INV]
  584. <bb 35> :
  585. if (pxHigherPriorityTaskWoken_91(D) != 0B)
  586. goto <bb 36>; [INV]
  587. else
  588. goto <bb 37>; [INV]
  589. <bb 36> :
  590. *pxHigherPriorityTaskWoken_91(D) = 1;
  591. <bb 37> :
  592. xYieldPending ={v} 1;
  593. <bb 38> :
  594. vPortSetBASEPRI (uxSavedInterruptStatus_57);
  595. _96 = xReturn_41;
  596. <bb 39> :
  597. <L38>:
  598. return _96;
  599. }
  600. xTaskGenericNotify (struct tskTaskControlBlock * xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t * pulPreviousNotificationValue)
  601. {
  602. struct ListItem_t * const pxIndex;
  603. struct List_t * const pxList;
  604. uint8_t ucOriginalNotifyState;
  605. BaseType_t xReturn;
  606. struct TCB_t * pxTCB;
  607. BaseType_t D.8158;
  608. long unsigned int _1;
  609. long unsigned int _2;
  610. long unsigned int _3;
  611. long unsigned int _4;
  612. long unsigned int _5;
  613. long unsigned int xTickCount.140_6;
  614. struct xLIST_ITEM * _7;
  615. struct xLIST_ITEM * _8;
  616. struct xLIST_ITEM * _9;
  617. struct xLIST_ITEM * _10;
  618. struct ListItem_t * _11;
  619. struct ListItem_t * _12;
  620. struct xLIST_ITEM * _13;
  621. long unsigned int _14;
  622. long unsigned int _15;
  623. long unsigned int _16;
  624. long unsigned int uxTopReadyPriority.141_17;
  625. long unsigned int _18;
  626. long unsigned int _19;
  627. struct xLIST_ITEM * _20;
  628. struct xLIST_ITEM * _21;
  629. struct ListItem_t * _22;
  630. struct ListItem_t * _23;
  631. long unsigned int _24;
  632. struct List_t * _25;
  633. long unsigned int _26;
  634. long unsigned int _27;
  635. long unsigned int _28;
  636. struct xLIST * _29;
  637. long unsigned int _30;
  638. struct TCB_t * pxCurrentTCB.142_31;
  639. long unsigned int _32;
  640. volatile uint32_t * _33;
  641. BaseType_t _79;
  642. <bb 2> :
  643. xReturn_42 = 1;
  644. if (uxIndexToNotify_43(D) != 0)
  645. goto <bb 3>; [INV]
  646. else
  647. goto <bb 5>; [INV]
  648. <bb 3> :
  649. vPortRaiseBASEPRI ();
  650. <bb 4> :
  651. goto <bb 4>; [INV]
  652. <bb 5> :
  653. if (xTaskToNotify_44(D) == 0B)
  654. goto <bb 6>; [INV]
  655. else
  656. goto <bb 8>; [INV]
  657. <bb 6> :
  658. vPortRaiseBASEPRI ();
  659. <bb 7> :
  660. goto <bb 7>; [INV]
  661. <bb 8> :
  662. pxTCB_45 = xTaskToNotify_44(D);
  663. vPortEnterCritical ();
  664. if (pulPreviousNotificationValue_48(D) != 0B)
  665. goto <bb 9>; [INV]
  666. else
  667. goto <bb 10>; [INV]
  668. <bb 9> :
  669. _1 ={v} pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)];
  670. *pulPreviousNotificationValue_48(D) = _1;
  671. <bb 10> :
  672. ucOriginalNotifyState_50 ={v} pxTCB_45->ucNotifyState[uxIndexToNotify_43(D)];
  673. pxTCB_45->ucNotifyState[uxIndexToNotify_43(D)] ={v} 2;
  674. switch (eAction_52(D)) <default: <L16> [INV], case 0: <L15> [INV], case 1: <L8> [INV], case 2: <L9> [INV], case 3: <L10> [INV], case 4: <L11> [INV]>
  675. <bb 11> :
  676. <L8>:
  677. _2 ={v} pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)];
  678. _3 = ulValue_54(D) | _2;
  679. pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)] ={v} _3;
  680. goto <bb 23>; [INV]
  681. <bb 12> :
  682. <L9>:
  683. _4 ={v} pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)];
  684. _5 = _4 + 1;
  685. pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)] ={v} _5;
  686. goto <bb 23>; [INV]
  687. <bb 13> :
  688. <L10>:
  689. pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)] ={v} ulValue_54(D);
  690. goto <bb 23>; [INV]
  691. <bb 14> :
  692. <L11>:
  693. if (ucOriginalNotifyState_50 != 2)
  694. goto <bb 15>; [INV]
  695. else
  696. goto <bb 16>; [INV]
  697. <bb 15> :
  698. pxTCB_45->ulNotifiedValue[uxIndexToNotify_43(D)] ={v} ulValue_54(D);
  699. goto <bb 17>; [INV]
  700. <bb 16> :
  701. xReturn_53 = 0;
  702. <bb 17> :
  703. # xReturn_34 = PHI <xReturn_42(15), xReturn_53(16)>
  704. goto <bb 23>; [INV]
  705. <bb 18> :
  706. <L15>:
  707. goto <bb 23>; [INV]
  708. <bb 19> :
  709. <L16>:
  710. xTickCount.140_6 ={v} xTickCount;
  711. if (xTickCount.140_6 != 0)
  712. goto <bb 20>; [INV]
  713. else
  714. goto <bb 22>; [INV]
  715. <bb 20> :
  716. vPortRaiseBASEPRI ();
  717. <bb 21> :
  718. goto <bb 21>; [INV]
  719. <bb 22> :
  720. <bb 23> :
  721. # xReturn_35 = PHI <xReturn_42(11), xReturn_42(12), xReturn_42(13), xReturn_34(17), xReturn_42(18), xReturn_42(22)>
  722. if (ucOriginalNotifyState_50 == 1)
  723. goto <bb 24>; [INV]
  724. else
  725. goto <bb 33>; [INV]
  726. <bb 24> :
  727. pxList_60 = pxTCB_45->xStateListItem.pvContainer;
  728. _7 = pxTCB_45->xStateListItem.pxNext;
  729. _8 = pxTCB_45->xStateListItem.pxPrevious;
  730. _7->pxPrevious = _8;
  731. _9 = pxTCB_45->xStateListItem.pxPrevious;
  732. _10 = pxTCB_45->xStateListItem.pxNext;
  733. _9->pxNext = _10;
  734. _11 = pxList_60->pxIndex;
  735. _12 = &pxTCB_45->xStateListItem;
  736. if (_11 == _12)
  737. goto <bb 25>; [INV]
  738. else
  739. goto <bb 26>; [INV]
  740. <bb 25> :
  741. _13 = pxTCB_45->xStateListItem.pxPrevious;
  742. pxList_60->pxIndex = _13;
  743. <bb 26> :
  744. pxTCB_45->xStateListItem.pvContainer = 0B;
  745. _14 ={v} pxList_60->uxNumberOfItems;
  746. _15 = _14 + 4294967295;
  747. pxList_60->uxNumberOfItems ={v} _15;
  748. _16 = pxTCB_45->uxPriority;
  749. uxTopReadyPriority.141_17 ={v} uxTopReadyPriority;
  750. if (_16 > uxTopReadyPriority.141_17)
  751. goto <bb 27>; [INV]
  752. else
  753. goto <bb 28>; [INV]
  754. <bb 27> :
  755. _18 = pxTCB_45->uxPriority;
  756. uxTopReadyPriority ={v} _18;
  757. <bb 28> :
  758. _19 = pxTCB_45->uxPriority;
  759. pxIndex_67 = pxReadyTasksLists[_19].pxIndex;
  760. pxTCB_45->xStateListItem.pxNext = pxIndex_67;
  761. _20 = pxIndex_67->pxPrevious;
  762. pxTCB_45->xStateListItem.pxPrevious = _20;
  763. _21 = pxIndex_67->pxPrevious;
  764. _22 = &pxTCB_45->xStateListItem;
  765. _21->pxNext = _22;
  766. _23 = &pxTCB_45->xStateListItem;
  767. pxIndex_67->pxPrevious = _23;
  768. _24 = pxTCB_45->uxPriority;
  769. _25 = &pxReadyTasksLists[_24];
  770. pxTCB_45->xStateListItem.pvContainer = _25;
  771. _26 = pxTCB_45->uxPriority;
  772. _27 ={v} pxReadyTasksLists[_26].uxNumberOfItems;
  773. _28 = _27 + 1;
  774. pxReadyTasksLists[_26].uxNumberOfItems ={v} _28;
  775. _29 = pxTCB_45->xEventListItem.pvContainer;
  776. if (_29 != 0B)
  777. goto <bb 29>; [INV]
  778. else
  779. goto <bb 31>; [INV]
  780. <bb 29> :
  781. vPortRaiseBASEPRI ();
  782. <bb 30> :
  783. goto <bb 30>; [INV]
  784. <bb 31> :
  785. _30 = pxTCB_45->uxPriority;
  786. pxCurrentTCB.142_31 ={v} pxCurrentTCB;
  787. _32 = pxCurrentTCB.142_31->uxPriority;
  788. if (_30 > _32)
  789. goto <bb 32>; [INV]
  790. else
  791. goto <bb 33>; [INV]
  792. <bb 32> :
  793. _33 = 3758157060B;
  794. *_33 ={v} 268435456;
  795. __asm__ __volatile__("dsb" : : : "memory");
  796. __asm__ __volatile__("isb");
  797. <bb 33> :
  798. vPortExitCritical ();
  799. _79 = xReturn_35;
  800. <bb 34> :
  801. <L34>:
  802. return _79;
  803. }
  804. xTaskGenericNotifyWait (UBaseType_t uxIndexToWait, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t * pulNotificationValue, TickType_t xTicksToWait)
  805. {
  806. BaseType_t xReturn;
  807. BaseType_t D.8133;
  808. struct TCB_t * pxCurrentTCB.138;
  809. struct TCB_t * pxCurrentTCB.134;
  810. struct TCB_t * pxCurrentTCB.133_1;
  811. unsigned char _2;
  812. long unsigned int _3;
  813. long unsigned int _4;
  814. long unsigned int _5;
  815. struct TCB_t * pxCurrentTCB.135_6;
  816. volatile uint32_t * _7;
  817. struct TCB_t * pxCurrentTCB.136_8;
  818. long unsigned int _9;
  819. struct TCB_t * pxCurrentTCB.137_10;
  820. unsigned char _11;
  821. long unsigned int _12;
  822. long unsigned int _13;
  823. long unsigned int _14;
  824. struct TCB_t * pxCurrentTCB.139_15;
  825. struct TCB_t * pxCurrentTCB.134_23;
  826. struct TCB_t * pxCurrentTCB.138_36;
  827. BaseType_t _43;
  828. <bb 2> :
  829. if (uxIndexToWait_20(D) != 0)
  830. goto <bb 3>; [INV]
  831. else
  832. goto <bb 5>; [INV]
  833. <bb 3> :
  834. vPortRaiseBASEPRI ();
  835. <bb 4> :
  836. goto <bb 4>; [INV]
  837. <bb 5> :
  838. vPortEnterCritical ();
  839. pxCurrentTCB.133_1 ={v} pxCurrentTCB;
  840. _2 ={v} pxCurrentTCB.133_1->ucNotifyState[uxIndexToWait_20(D)];
  841. if (_2 != 2)
  842. goto <bb 6>; [INV]
  843. else
  844. goto <bb 8>; [INV]
  845. <bb 6> :
  846. pxCurrentTCB.134_23 ={v} pxCurrentTCB;
  847. _3 ={v} pxCurrentTCB.134_23->ulNotifiedValue[uxIndexToWait_20(D)];
  848. _4 = ~ulBitsToClearOnEntry_24(D);
  849. _5 = _3 & _4;
  850. pxCurrentTCB.134_23->ulNotifiedValue[uxIndexToWait_20(D)] ={v} _5;
  851. pxCurrentTCB.135_6 ={v} pxCurrentTCB;
  852. pxCurrentTCB.135_6->ucNotifyState[uxIndexToWait_20(D)] ={v} 1;
  853. if (xTicksToWait_27(D) != 0)
  854. goto <bb 7>; [INV]
  855. else
  856. goto <bb 8>; [INV]
  857. <bb 7> :
  858. prvAddCurrentTaskToDelayedList (xTicksToWait_27(D), 1);
  859. _7 = 3758157060B;
  860. *_7 ={v} 268435456;
  861. __asm__ __volatile__("dsb" : : : "memory");
  862. __asm__ __volatile__("isb");
  863. <bb 8> :
  864. vPortExitCritical ();
  865. vPortEnterCritical ();
  866. if (pulNotificationValue_34(D) != 0B)
  867. goto <bb 9>; [INV]
  868. else
  869. goto <bb 10>; [INV]
  870. <bb 9> :
  871. pxCurrentTCB.136_8 ={v} pxCurrentTCB;
  872. _9 ={v} pxCurrentTCB.136_8->ulNotifiedValue[uxIndexToWait_20(D)];
  873. *pulNotificationValue_34(D) = _9;
  874. <bb 10> :
  875. pxCurrentTCB.137_10 ={v} pxCurrentTCB;
  876. _11 ={v} pxCurrentTCB.137_10->ucNotifyState[uxIndexToWait_20(D)];
  877. if (_11 != 2)
  878. goto <bb 11>; [INV]
  879. else
  880. goto <bb 12>; [INV]
  881. <bb 11> :
  882. xReturn_40 = 0;
  883. goto <bb 13>; [INV]
  884. <bb 12> :
  885. pxCurrentTCB.138_36 ={v} pxCurrentTCB;
  886. _12 ={v} pxCurrentTCB.138_36->ulNotifiedValue[uxIndexToWait_20(D)];
  887. _13 = ~ulBitsToClearOnExit_37(D);
  888. _14 = _12 & _13;
  889. pxCurrentTCB.138_36->ulNotifiedValue[uxIndexToWait_20(D)] ={v} _14;
  890. xReturn_39 = 1;
  891. <bb 13> :
  892. # xReturn_16 = PHI <xReturn_40(11), xReturn_39(12)>
  893. pxCurrentTCB.139_15 ={v} pxCurrentTCB;
  894. pxCurrentTCB.139_15->ucNotifyState[uxIndexToWait_20(D)] ={v} 0;
  895. vPortExitCritical ();
  896. _43 = xReturn_16;
  897. <bb 14> :
  898. <L14>:
  899. return _43;
  900. }
  901. ulTaskGenericNotifyTake (UBaseType_t uxIndexToWait, BaseType_t xClearCountOnExit, TickType_t xTicksToWait)
  902. {
  903. uint32_t ulReturn;
  904. uint32_t D.8116;
  905. struct TCB_t * pxCurrentTCB.127_1;
  906. long unsigned int _2;
  907. struct TCB_t * pxCurrentTCB.128_3;
  908. volatile uint32_t * _4;
  909. struct TCB_t * pxCurrentTCB.129_5;
  910. struct TCB_t * pxCurrentTCB.130_6;
  911. struct TCB_t * pxCurrentTCB.131_7;
  912. long unsigned int _8;
  913. struct TCB_t * pxCurrentTCB.132_9;
  914. uint32_t _29;
  915. <bb 2> :
  916. if (uxIndexToWait_12(D) != 0)
  917. goto <bb 3>; [INV]
  918. else
  919. goto <bb 5>; [INV]
  920. <bb 3> :
  921. vPortRaiseBASEPRI ();
  922. <bb 4> :
  923. goto <bb 4>; [INV]
  924. <bb 5> :
  925. vPortEnterCritical ();
  926. pxCurrentTCB.127_1 ={v} pxCurrentTCB;
  927. _2 ={v} pxCurrentTCB.127_1->ulNotifiedValue[uxIndexToWait_12(D)];
  928. if (_2 == 0)
  929. goto <bb 6>; [INV]
  930. else
  931. goto <bb 8>; [INV]
  932. <bb 6> :
  933. pxCurrentTCB.128_3 ={v} pxCurrentTCB;
  934. pxCurrentTCB.128_3->ucNotifyState[uxIndexToWait_12(D)] ={v} 1;
  935. if (xTicksToWait_16(D) != 0)
  936. goto <bb 7>; [INV]
  937. else
  938. goto <bb 8>; [INV]
  939. <bb 7> :
  940. prvAddCurrentTaskToDelayedList (xTicksToWait_16(D), 1);
  941. _4 = 3758157060B;
  942. *_4 ={v} 268435456;
  943. __asm__ __volatile__("dsb" : : : "memory");
  944. __asm__ __volatile__("isb");
  945. <bb 8> :
  946. vPortExitCritical ();
  947. vPortEnterCritical ();
  948. pxCurrentTCB.129_5 ={v} pxCurrentTCB;
  949. ulReturn_23 ={v} pxCurrentTCB.129_5->ulNotifiedValue[uxIndexToWait_12(D)];
  950. if (ulReturn_23 != 0)
  951. goto <bb 9>; [INV]
  952. else
  953. goto <bb 12>; [INV]
  954. <bb 9> :
  955. if (xClearCountOnExit_24(D) != 0)
  956. goto <bb 10>; [INV]
  957. else
  958. goto <bb 11>; [INV]
  959. <bb 10> :
  960. pxCurrentTCB.130_6 ={v} pxCurrentTCB;
  961. pxCurrentTCB.130_6->ulNotifiedValue[uxIndexToWait_12(D)] ={v} 0;
  962. goto <bb 12>; [INV]
  963. <bb 11> :
  964. pxCurrentTCB.131_7 ={v} pxCurrentTCB;
  965. _8 = ulReturn_23 + 4294967295;
  966. pxCurrentTCB.131_7->ulNotifiedValue[uxIndexToWait_12(D)] ={v} _8;
  967. <bb 12> :
  968. pxCurrentTCB.132_9 ={v} pxCurrentTCB;
  969. pxCurrentTCB.132_9->ucNotifyState[uxIndexToWait_12(D)] ={v} 0;
  970. vPortExitCritical ();
  971. _29 = ulReturn_23;
  972. <bb 13> :
  973. <L15>:
  974. return _29;
  975. }
  976. pvTaskIncrementMutexHeldCount ()
  977. {
  978. struct tskTaskControlBlock * D.8100;
  979. struct TCB_t * pxCurrentTCB.125_1;
  980. struct TCB_t * pxCurrentTCB.126_2;
  981. long unsigned int _3;
  982. long unsigned int _4;
  983. struct tskTaskControlBlock * _8;
  984. <bb 2> :
  985. pxCurrentTCB.125_1 ={v} pxCurrentTCB;
  986. if (pxCurrentTCB.125_1 != 0B)
  987. goto <bb 3>; [INV]
  988. else
  989. goto <bb 4>; [INV]
  990. <bb 3> :
  991. pxCurrentTCB.126_2 ={v} pxCurrentTCB;
  992. _3 = pxCurrentTCB.126_2->uxMutexesHeld;
  993. _4 = _3 + 1;
  994. pxCurrentTCB.126_2->uxMutexesHeld = _4;
  995. <bb 4> :
  996. _8 ={v} pxCurrentTCB;
  997. <bb 5> :
  998. <L2>:
  999. return _8;
  1000. }
  1001. uxTaskResetEventItemValue ()
  1002. {
  1003. TickType_t uxReturn;
  1004. TickType_t D.8096;
  1005. struct TCB_t * pxCurrentTCB.122_1;
  1006. struct TCB_t * pxCurrentTCB.123_2;
  1007. long unsigned int _3;
  1008. struct TCB_t * pxCurrentTCB.124_4;
  1009. long unsigned int _5;
  1010. TickType_t _9;
  1011. <bb 2> :
  1012. pxCurrentTCB.122_1 ={v} pxCurrentTCB;
  1013. uxReturn_7 = pxCurrentTCB.122_1->xEventListItem.xItemValue;
  1014. pxCurrentTCB.123_2 ={v} pxCurrentTCB;
  1015. _3 = pxCurrentTCB.123_2->uxPriority;
  1016. pxCurrentTCB.124_4 ={v} pxCurrentTCB;
  1017. _5 = 5 - _3;
  1018. pxCurrentTCB.124_4->xEventListItem.xItemValue = _5;
  1019. _9 = uxReturn_7;
  1020. <bb 3> :
  1021. <L0>:
  1022. return _9;
  1023. }
  1024. vTaskList (char * pcWriteBuffer)
  1025. {
  1026. char cStatus;
  1027. UBaseType_t x;
  1028. UBaseType_t uxArraySize;
  1029. struct TaskStatus_t * pxTaskStatusArray;
  1030. long unsigned int uxCurrentNumberOfTasks.121_1;
  1031. long unsigned int _2;
  1032. long unsigned int _3;
  1033. struct TaskStatus_t * _4;
  1034. <unnamed type> _5;
  1035. long unsigned int _6;
  1036. struct TaskStatus_t * _7;
  1037. const char * _8;
  1038. int _9;
  1039. long unsigned int _10;
  1040. struct TaskStatus_t * _11;
  1041. long unsigned int _12;
  1042. long unsigned int _13;
  1043. struct TaskStatus_t * _14;
  1044. short unsigned int _15;
  1045. unsigned int _16;
  1046. long unsigned int _17;
  1047. struct TaskStatus_t * _18;
  1048. long unsigned int _19;
  1049. unsigned int _20;
  1050. <bb 2> :
  1051. *pcWriteBuffer_27(D) = 0;
  1052. uxArraySize_29 ={v} uxCurrentNumberOfTasks;
  1053. uxCurrentNumberOfTasks.121_1 ={v} uxCurrentNumberOfTasks;
  1054. _2 = uxCurrentNumberOfTasks.121_1 * 36;
  1055. pxTaskStatusArray_31 = pvPortMalloc (_2);
  1056. if (pxTaskStatusArray_31 != 0B)
  1057. goto <bb 3>; [INV]
  1058. else
  1059. goto <bb 14>; [INV]
  1060. <bb 3> :
  1061. uxArraySize_33 = uxTaskGetSystemState (pxTaskStatusArray_31, uxArraySize_29, 0B);
  1062. x_34 = 0;
  1063. goto <bb 12>; [INV]
  1064. <bb 4> :
  1065. _3 = x_22 * 36;
  1066. _4 = pxTaskStatusArray_31 + _3;
  1067. _5 = _4->eCurrentState;
  1068. 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]>
  1069. <bb 5> :
  1070. <L2>:
  1071. cStatus_40 = 88;
  1072. goto <bb 11>; [INV]
  1073. <bb 6> :
  1074. <L3>:
  1075. cStatus_39 = 82;
  1076. goto <bb 11>; [INV]
  1077. <bb 7> :
  1078. <L4>:
  1079. cStatus_38 = 66;
  1080. goto <bb 11>; [INV]
  1081. <bb 8> :
  1082. <L5>:
  1083. cStatus_37 = 83;
  1084. goto <bb 11>; [INV]
  1085. <bb 9> :
  1086. <L6>:
  1087. cStatus_36 = 68;
  1088. goto <bb 11>; [INV]
  1089. <bb 10> :
  1090. <L7>:
  1091. cStatus_41 = 0;
  1092. <bb 11> :
  1093. # cStatus_23 = PHI <cStatus_40(5), cStatus_39(6), cStatus_38(7), cStatus_37(8), cStatus_36(9), cStatus_41(10)>
  1094. _6 = x_22 * 36;
  1095. _7 = pxTaskStatusArray_31 + _6;
  1096. _8 = _7->pcTaskName;
  1097. pcWriteBuffer_43 = prvWriteNameToBuffer (pcWriteBuffer_21, _8);
  1098. _9 = (int) cStatus_23;
  1099. _10 = x_22 * 36;
  1100. _11 = pxTaskStatusArray_31 + _10;
  1101. _12 = _11->uxCurrentPriority;
  1102. _13 = x_22 * 36;
  1103. _14 = pxTaskStatusArray_31 + _13;
  1104. _15 = _14->usStackHighWaterMark;
  1105. _16 = (unsigned int) _15;
  1106. _17 = x_22 * 36;
  1107. _18 = pxTaskStatusArray_31 + _17;
  1108. _19 = _18->xTaskNumber;
  1109. sprintf (pcWriteBuffer_43, "\t%c\t%u\t%u\t%u\r\n", _9, _12, _16, _19);
  1110. _20 = strlen (pcWriteBuffer_43);
  1111. pcWriteBuffer_45 = pcWriteBuffer_43 + _20;
  1112. x_46 = x_22 + 1;
  1113. <bb 12> :
  1114. # pcWriteBuffer_21 = PHI <pcWriteBuffer_27(D)(3), pcWriteBuffer_45(11)>
  1115. # x_22 = PHI <x_34(3), x_46(11)>
  1116. if (x_22 < uxArraySize_33)
  1117. goto <bb 4>; [INV]
  1118. else
  1119. goto <bb 13>; [INV]
  1120. <bb 13> :
  1121. vPortFree (pxTaskStatusArray_31);
  1122. <bb 14> :
  1123. return;
  1124. }
  1125. prvWriteNameToBuffer (char * pcBuffer, const char * pcTaskName)
  1126. {
  1127. size_t x;
  1128. char * D.8091;
  1129. char * _1;
  1130. char * _2;
  1131. char * _11;
  1132. <bb 2> :
  1133. strcpy (pcBuffer_6(D), pcTaskName_7(D));
  1134. x_9 = strlen (pcBuffer_6(D));
  1135. goto <bb 4>; [INV]
  1136. <bb 3> :
  1137. _1 = pcBuffer_6(D) + x_3;
  1138. *_1 = 32;
  1139. x_13 = x_3 + 1;
  1140. <bb 4> :
  1141. # x_3 = PHI <x_9(2), x_13(3)>
  1142. if (x_3 <= 8)
  1143. goto <bb 3>; [INV]
  1144. else
  1145. goto <bb 5>; [INV]
  1146. <bb 5> :
  1147. _2 = pcBuffer_6(D) + x_3;
  1148. *_2 = 0;
  1149. _11 = pcBuffer_6(D) + x_3;
  1150. <bb 6> :
  1151. <L3>:
  1152. return _11;
  1153. }
  1154. vTaskPriorityDisinheritAfterTimeout (struct tskTaskControlBlock * const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask)
  1155. {
  1156. struct ListItem_t * const pxIndex;
  1157. const UBaseType_t uxOnlyOneMutexHeld;
  1158. UBaseType_t uxPriorityToUse;
  1159. UBaseType_t uxPriorityUsedOnEntry;
  1160. struct TCB_t * const pxTCB;
  1161. long unsigned int _1;
  1162. long unsigned int _2;
  1163. long unsigned int _3;
  1164. long unsigned int _4;
  1165. struct TCB_t * pxCurrentTCB.119_5;
  1166. long unsigned int _6;
  1167. signed int _7;
  1168. long unsigned int _8;
  1169. struct xLIST * _9;
  1170. struct List_t * _10;
  1171. struct ListItem_t * _11;
  1172. long unsigned int _12;
  1173. long unsigned int _13;
  1174. long unsigned int uxTopReadyPriority.120_14;
  1175. long unsigned int _15;
  1176. long unsigned int _16;
  1177. struct xLIST_ITEM * _17;
  1178. struct xLIST_ITEM * _18;
  1179. struct ListItem_t * _19;
  1180. struct ListItem_t * _20;
  1181. long unsigned int _21;
  1182. struct List_t * _22;
  1183. long unsigned int _23;
  1184. long unsigned int _24;
  1185. long unsigned int _25;
  1186. <bb 2> :
  1187. pxTCB_31 = pxMutexHolder_30(D);
  1188. uxOnlyOneMutexHeld_32 = 1;
  1189. if (pxMutexHolder_30(D) != 0B)
  1190. goto <bb 3>; [INV]
  1191. else
  1192. goto <bb 21>; [INV]
  1193. <bb 3> :
  1194. _1 = pxTCB_31->uxMutexesHeld;
  1195. if (_1 == 0)
  1196. goto <bb 4>; [INV]
  1197. else
  1198. goto <bb 6>; [INV]
  1199. <bb 4> :
  1200. vPortRaiseBASEPRI ();
  1201. <bb 5> :
  1202. goto <bb 5>; [INV]
  1203. <bb 6> :
  1204. _2 = pxTCB_31->uxBasePriority;
  1205. if (uxHighestPriorityWaitingTask_34(D) > _2)
  1206. goto <bb 7>; [INV]
  1207. else
  1208. goto <bb 8>; [INV]
  1209. <bb 7> :
  1210. uxPriorityToUse_36 = uxHighestPriorityWaitingTask_34(D);
  1211. goto <bb 9>; [INV]
  1212. <bb 8> :
  1213. uxPriorityToUse_35 = pxTCB_31->uxBasePriority;
  1214. <bb 9> :
  1215. # uxPriorityToUse_26 = PHI <uxPriorityToUse_36(7), uxPriorityToUse_35(8)>
  1216. _3 = pxTCB_31->uxPriority;
  1217. if (uxPriorityToUse_26 != _3)
  1218. goto <bb 10>; [INV]
  1219. else
  1220. goto <bb 21>; [INV]
  1221. <bb 10> :
  1222. _4 = pxTCB_31->uxMutexesHeld;
  1223. if (uxOnlyOneMutexHeld_32 == _4)
  1224. goto <bb 11>; [INV]
  1225. else
  1226. goto <bb 21>; [INV]
  1227. <bb 11> :
  1228. pxCurrentTCB.119_5 ={v} pxCurrentTCB;
  1229. if (pxTCB_31 == pxCurrentTCB.119_5)
  1230. goto <bb 12>; [INV]
  1231. else
  1232. goto <bb 14>; [INV]
  1233. <bb 12> :
  1234. vPortRaiseBASEPRI ();
  1235. <bb 13> :
  1236. goto <bb 13>; [INV]
  1237. <bb 14> :
  1238. uxPriorityUsedOnEntry_37 = pxTCB_31->uxPriority;
  1239. pxTCB_31->uxPriority = uxPriorityToUse_26;
  1240. _6 = pxTCB_31->xEventListItem.xItemValue;
  1241. _7 = (signed int) _6;
  1242. if (_7 >= 0)
  1243. goto <bb 15>; [INV]
  1244. else
  1245. goto <bb 16>; [INV]
  1246. <bb 15> :
  1247. _8 = 5 - uxPriorityToUse_26;
  1248. pxTCB_31->xEventListItem.xItemValue = _8;
  1249. <bb 16> :
  1250. _9 = pxTCB_31->xStateListItem.pvContainer;
  1251. _10 = &pxReadyTasksLists[uxPriorityUsedOnEntry_37];
  1252. if (_9 == _10)
  1253. goto <bb 17>; [INV]
  1254. else
  1255. goto <bb 21>; [INV]
  1256. <bb 17> :
  1257. _11 = &pxTCB_31->xStateListItem;
  1258. _12 = uxListRemove (_11);
  1259. <bb 18> :
  1260. _13 = pxTCB_31->uxPriority;
  1261. uxTopReadyPriority.120_14 ={v} uxTopReadyPriority;
  1262. if (_13 > uxTopReadyPriority.120_14)
  1263. goto <bb 19>; [INV]
  1264. else
  1265. goto <bb 20>; [INV]
  1266. <bb 19> :
  1267. _15 = pxTCB_31->uxPriority;
  1268. uxTopReadyPriority ={v} _15;
  1269. <bb 20> :
  1270. _16 = pxTCB_31->uxPriority;
  1271. pxIndex_42 = pxReadyTasksLists[_16].pxIndex;
  1272. pxTCB_31->xStateListItem.pxNext = pxIndex_42;
  1273. _17 = pxIndex_42->pxPrevious;
  1274. pxTCB_31->xStateListItem.pxPrevious = _17;
  1275. _18 = pxIndex_42->pxPrevious;
  1276. _19 = &pxTCB_31->xStateListItem;
  1277. _18->pxNext = _19;
  1278. _20 = &pxTCB_31->xStateListItem;
  1279. pxIndex_42->pxPrevious = _20;
  1280. _21 = pxTCB_31->uxPriority;
  1281. _22 = &pxReadyTasksLists[_21];
  1282. pxTCB_31->xStateListItem.pvContainer = _22;
  1283. _23 = pxTCB_31->uxPriority;
  1284. _24 ={v} pxReadyTasksLists[_23].uxNumberOfItems;
  1285. _25 = _24 + 1;
  1286. pxReadyTasksLists[_23].uxNumberOfItems ={v} _25;
  1287. <bb 21> :
  1288. return;
  1289. }
  1290. xTaskPriorityDisinherit (struct tskTaskControlBlock * const pxMutexHolder)
  1291. {
  1292. struct ListItem_t * const pxIndex;
  1293. BaseType_t xReturn;
  1294. struct TCB_t * const pxTCB;
  1295. BaseType_t D.8062;
  1296. struct TCB_t * pxCurrentTCB.117_1;
  1297. long unsigned int _2;
  1298. long unsigned int _3;
  1299. long unsigned int _4;
  1300. long unsigned int _5;
  1301. long unsigned int _6;
  1302. long unsigned int _7;
  1303. struct ListItem_t * _8;
  1304. long unsigned int _9;
  1305. long unsigned int _10;
  1306. long unsigned int _11;
  1307. long unsigned int _12;
  1308. long unsigned int _13;
  1309. long unsigned int uxTopReadyPriority.118_14;
  1310. long unsigned int _15;
  1311. long unsigned int _16;
  1312. struct xLIST_ITEM * _17;
  1313. struct xLIST_ITEM * _18;
  1314. struct ListItem_t * _19;
  1315. struct ListItem_t * _20;
  1316. long unsigned int _21;
  1317. struct List_t * _22;
  1318. long unsigned int _23;
  1319. long unsigned int _24;
  1320. long unsigned int _25;
  1321. BaseType_t _48;
  1322. <bb 2> :
  1323. pxTCB_30 = pxMutexHolder_29(D);
  1324. xReturn_31 = 0;
  1325. if (pxMutexHolder_29(D) != 0B)
  1326. goto <bb 3>; [INV]
  1327. else
  1328. goto <bb 15>; [INV]
  1329. <bb 3> :
  1330. pxCurrentTCB.117_1 ={v} pxCurrentTCB;
  1331. if (pxTCB_30 != pxCurrentTCB.117_1)
  1332. goto <bb 4>; [INV]
  1333. else
  1334. goto <bb 6>; [INV]
  1335. <bb 4> :
  1336. vPortRaiseBASEPRI ();
  1337. <bb 5> :
  1338. goto <bb 5>; [INV]
  1339. <bb 6> :
  1340. _2 = pxTCB_30->uxMutexesHeld;
  1341. if (_2 == 0)
  1342. goto <bb 7>; [INV]
  1343. else
  1344. goto <bb 9>; [INV]
  1345. <bb 7> :
  1346. vPortRaiseBASEPRI ();
  1347. <bb 8> :
  1348. goto <bb 8>; [INV]
  1349. <bb 9> :
  1350. _3 = pxTCB_30->uxMutexesHeld;
  1351. _4 = _3 + 4294967295;
  1352. pxTCB_30->uxMutexesHeld = _4;
  1353. _5 = pxTCB_30->uxPriority;
  1354. _6 = pxTCB_30->uxBasePriority;
  1355. if (_5 != _6)
  1356. goto <bb 10>; [INV]
  1357. else
  1358. goto <bb 15>; [INV]
  1359. <bb 10> :
  1360. _7 = pxTCB_30->uxMutexesHeld;
  1361. if (_7 == 0)
  1362. goto <bb 11>; [INV]
  1363. else
  1364. goto <bb 15>; [INV]
  1365. <bb 11> :
  1366. _8 = &pxTCB_30->xStateListItem;
  1367. _9 = uxListRemove (_8);
  1368. <bb 12> :
  1369. _10 = pxTCB_30->uxBasePriority;
  1370. pxTCB_30->uxPriority = _10;
  1371. _11 = pxTCB_30->uxPriority;
  1372. _12 = 5 - _11;
  1373. pxTCB_30->xEventListItem.xItemValue = _12;
  1374. _13 = pxTCB_30->uxPriority;
  1375. uxTopReadyPriority.118_14 ={v} uxTopReadyPriority;
  1376. if (_13 > uxTopReadyPriority.118_14)
  1377. goto <bb 13>; [INV]
  1378. else
  1379. goto <bb 14>; [INV]
  1380. <bb 13> :
  1381. _15 = pxTCB_30->uxPriority;
  1382. uxTopReadyPriority ={v} _15;
  1383. <bb 14> :
  1384. _16 = pxTCB_30->uxPriority;
  1385. pxIndex_38 = pxReadyTasksLists[_16].pxIndex;
  1386. pxTCB_30->xStateListItem.pxNext = pxIndex_38;
  1387. _17 = pxIndex_38->pxPrevious;
  1388. pxTCB_30->xStateListItem.pxPrevious = _17;
  1389. _18 = pxIndex_38->pxPrevious;
  1390. _19 = &pxTCB_30->xStateListItem;
  1391. _18->pxNext = _19;
  1392. _20 = &pxTCB_30->xStateListItem;
  1393. pxIndex_38->pxPrevious = _20;
  1394. _21 = pxTCB_30->uxPriority;
  1395. _22 = &pxReadyTasksLists[_21];
  1396. pxTCB_30->xStateListItem.pvContainer = _22;
  1397. _23 = pxTCB_30->uxPriority;
  1398. _24 ={v} pxReadyTasksLists[_23].uxNumberOfItems;
  1399. _25 = _24 + 1;
  1400. pxReadyTasksLists[_23].uxNumberOfItems ={v} _25;
  1401. xReturn_45 = 1;
  1402. <bb 15> :
  1403. # xReturn_26 = PHI <xReturn_31(2), xReturn_45(14), xReturn_31(9), xReturn_31(10)>
  1404. _48 = xReturn_26;
  1405. <bb 16> :
  1406. <L20>:
  1407. return _48;
  1408. }
  1409. xTaskPriorityInherit (struct tskTaskControlBlock * const pxMutexHolder)
  1410. {
  1411. struct ListItem_t * const pxIndex;
  1412. BaseType_t xReturn;
  1413. struct TCB_t * const pxMutexHolderTCB;
  1414. BaseType_t D.8042;
  1415. long unsigned int _1;
  1416. struct TCB_t * pxCurrentTCB.111_2;
  1417. long unsigned int _3;
  1418. long unsigned int _4;
  1419. signed int _5;
  1420. struct TCB_t * pxCurrentTCB.112_6;
  1421. long unsigned int _7;
  1422. long unsigned int _8;
  1423. struct xLIST * _9;
  1424. long unsigned int _10;
  1425. struct List_t * _11;
  1426. struct ListItem_t * _12;
  1427. long unsigned int _13;
  1428. struct TCB_t * pxCurrentTCB.113_14;
  1429. long unsigned int _15;
  1430. long unsigned int _16;
  1431. long unsigned int uxTopReadyPriority.114_17;
  1432. long unsigned int _18;
  1433. long unsigned int _19;
  1434. struct xLIST_ITEM * _20;
  1435. struct xLIST_ITEM * _21;
  1436. struct ListItem_t * _22;
  1437. struct ListItem_t * _23;
  1438. long unsigned int _24;
  1439. struct List_t * _25;
  1440. long unsigned int _26;
  1441. long unsigned int _27;
  1442. long unsigned int _28;
  1443. struct TCB_t * pxCurrentTCB.115_29;
  1444. long unsigned int _30;
  1445. long unsigned int _31;
  1446. struct TCB_t * pxCurrentTCB.116_32;
  1447. long unsigned int _33;
  1448. BaseType_t _57;
  1449. <bb 2> :
  1450. pxMutexHolderTCB_40 = pxMutexHolder_39(D);
  1451. xReturn_41 = 0;
  1452. if (pxMutexHolder_39(D) != 0B)
  1453. goto <bb 3>; [INV]
  1454. else
  1455. goto <bb 15>; [INV]
  1456. <bb 3> :
  1457. _1 = pxMutexHolderTCB_40->uxPriority;
  1458. pxCurrentTCB.111_2 ={v} pxCurrentTCB;
  1459. _3 = pxCurrentTCB.111_2->uxPriority;
  1460. if (_1 < _3)
  1461. goto <bb 4>; [INV]
  1462. else
  1463. goto <bb 13>; [INV]
  1464. <bb 4> :
  1465. _4 = pxMutexHolderTCB_40->xEventListItem.xItemValue;
  1466. _5 = (signed int) _4;
  1467. if (_5 >= 0)
  1468. goto <bb 5>; [INV]
  1469. else
  1470. goto <bb 6>; [INV]
  1471. <bb 5> :
  1472. pxCurrentTCB.112_6 ={v} pxCurrentTCB;
  1473. _7 = pxCurrentTCB.112_6->uxPriority;
  1474. _8 = 5 - _7;
  1475. pxMutexHolderTCB_40->xEventListItem.xItemValue = _8;
  1476. <bb 6> :
  1477. _9 = pxMutexHolderTCB_40->xStateListItem.pvContainer;
  1478. _10 = pxMutexHolderTCB_40->uxPriority;
  1479. _11 = &pxReadyTasksLists[_10];
  1480. if (_9 == _11)
  1481. goto <bb 7>; [INV]
  1482. else
  1483. goto <bb 11>; [INV]
  1484. <bb 7> :
  1485. _12 = &pxMutexHolderTCB_40->xStateListItem;
  1486. _13 = uxListRemove (_12);
  1487. <bb 8> :
  1488. pxCurrentTCB.113_14 ={v} pxCurrentTCB;
  1489. _15 = pxCurrentTCB.113_14->uxPriority;
  1490. pxMutexHolderTCB_40->uxPriority = _15;
  1491. _16 = pxMutexHolderTCB_40->uxPriority;
  1492. uxTopReadyPriority.114_17 ={v} uxTopReadyPriority;
  1493. if (_16 > uxTopReadyPriority.114_17)
  1494. goto <bb 9>; [INV]
  1495. else
  1496. goto <bb 10>; [INV]
  1497. <bb 9> :
  1498. _18 = pxMutexHolderTCB_40->uxPriority;
  1499. uxTopReadyPriority ={v} _18;
  1500. <bb 10> :
  1501. _19 = pxMutexHolderTCB_40->uxPriority;
  1502. pxIndex_49 = pxReadyTasksLists[_19].pxIndex;
  1503. pxMutexHolderTCB_40->xStateListItem.pxNext = pxIndex_49;
  1504. _20 = pxIndex_49->pxPrevious;
  1505. pxMutexHolderTCB_40->xStateListItem.pxPrevious = _20;
  1506. _21 = pxIndex_49->pxPrevious;
  1507. _22 = &pxMutexHolderTCB_40->xStateListItem;
  1508. _21->pxNext = _22;
  1509. _23 = &pxMutexHolderTCB_40->xStateListItem;
  1510. pxIndex_49->pxPrevious = _23;
  1511. _24 = pxMutexHolderTCB_40->uxPriority;
  1512. _25 = &pxReadyTasksLists[_24];
  1513. pxMutexHolderTCB_40->xStateListItem.pvContainer = _25;
  1514. _26 = pxMutexHolderTCB_40->uxPriority;
  1515. _27 ={v} pxReadyTasksLists[_26].uxNumberOfItems;
  1516. _28 = _27 + 1;
  1517. pxReadyTasksLists[_26].uxNumberOfItems ={v} _28;
  1518. goto <bb 12>; [INV]
  1519. <bb 11> :
  1520. pxCurrentTCB.115_29 ={v} pxCurrentTCB;
  1521. _30 = pxCurrentTCB.115_29->uxPriority;
  1522. pxMutexHolderTCB_40->uxPriority = _30;
  1523. <bb 12> :
  1524. xReturn_56 = 1;
  1525. goto <bb 15>; [INV]
  1526. <bb 13> :
  1527. _31 = pxMutexHolderTCB_40->uxBasePriority;
  1528. pxCurrentTCB.116_32 ={v} pxCurrentTCB;
  1529. _33 = pxCurrentTCB.116_32->uxPriority;
  1530. if (_31 < _33)
  1531. goto <bb 14>; [INV]
  1532. else
  1533. goto <bb 15>; [INV]
  1534. <bb 14> :
  1535. xReturn_43 = 1;
  1536. <bb 15> :
  1537. # xReturn_34 = PHI <xReturn_41(2), xReturn_41(13), xReturn_56(12), xReturn_43(14)>
  1538. _57 = xReturn_34;
  1539. <bb 16> :
  1540. <L20>:
  1541. return _57;
  1542. }
  1543. xTaskGetSchedulerState ()
  1544. {
  1545. BaseType_t xReturn;
  1546. BaseType_t D.8020;
  1547. long int xSchedulerRunning.109_1;
  1548. long unsigned int uxSchedulerSuspended.110_2;
  1549. BaseType_t _8;
  1550. <bb 2> :
  1551. xSchedulerRunning.109_1 ={v} xSchedulerRunning;
  1552. if (xSchedulerRunning.109_1 == 0)
  1553. goto <bb 3>; [INV]
  1554. else
  1555. goto <bb 4>; [INV]
  1556. <bb 3> :
  1557. xReturn_7 = 1;
  1558. goto <bb 7>; [INV]
  1559. <bb 4> :
  1560. uxSchedulerSuspended.110_2 ={v} uxSchedulerSuspended;
  1561. if (uxSchedulerSuspended.110_2 == 0)
  1562. goto <bb 5>; [INV]
  1563. else
  1564. goto <bb 6>; [INV]
  1565. <bb 5> :
  1566. xReturn_6 = 2;
  1567. goto <bb 7>; [INV]
  1568. <bb 6> :
  1569. xReturn_5 = 0;
  1570. <bb 7> :
  1571. # xReturn_3 = PHI <xReturn_7(3), xReturn_6(5), xReturn_5(6)>
  1572. _8 = xReturn_3;
  1573. <bb 8> :
  1574. <L6>:
  1575. return _8;
  1576. }
  1577. xTaskGetCurrentTaskHandle ()
  1578. {
  1579. struct tskTaskControlBlock * xReturn;
  1580. struct tskTaskControlBlock * D.8012;
  1581. struct tskTaskControlBlock * _3;
  1582. <bb 2> :
  1583. xReturn_2 ={v} pxCurrentTCB;
  1584. _3 = xReturn_2;
  1585. <bb 3> :
  1586. <L0>:
  1587. return _3;
  1588. }
  1589. prvResetNextTaskUnblockTime ()
  1590. {
  1591. struct List_t * pxDelayedTaskList.107_1;
  1592. long unsigned int _2;
  1593. struct List_t * pxDelayedTaskList.108_3;
  1594. struct xLIST_ITEM * _4;
  1595. long unsigned int _5;
  1596. <bb 2> :
  1597. pxDelayedTaskList.107_1 ={v} pxDelayedTaskList;
  1598. _2 ={v} pxDelayedTaskList.107_1->uxNumberOfItems;
  1599. if (_2 == 0)
  1600. goto <bb 3>; [INV]
  1601. else
  1602. goto <bb 4>; [INV]
  1603. <bb 3> :
  1604. xNextTaskUnblockTime ={v} 4294967295;
  1605. goto <bb 5>; [INV]
  1606. <bb 4> :
  1607. pxDelayedTaskList.108_3 ={v} pxDelayedTaskList;
  1608. _4 = pxDelayedTaskList.108_3->xListEnd.pxNext;
  1609. _5 = _4->xItemValue;
  1610. xNextTaskUnblockTime ={v} _5;
  1611. <bb 5> :
  1612. return;
  1613. }
  1614. prvDeleteTCB (struct TCB_t * pxTCB)
  1615. {
  1616. StackType_t * _1;
  1617. <bb 2> :
  1618. _1 = pxTCB_3(D)->pxStack;
  1619. vPortFree (_1);
  1620. vPortFree (pxTCB_3(D));
  1621. return;
  1622. }
  1623. uxTaskGetStackHighWaterMark (struct tskTaskControlBlock * xTask)
  1624. {
  1625. UBaseType_t uxReturn;
  1626. uint8_t * pucEndOfStack;
  1627. struct TCB_t * pxTCB;
  1628. UBaseType_t D.8007;
  1629. struct TCB_t * iftmp.106;
  1630. short unsigned int _1;
  1631. struct TCB_t * iftmp.106_2;
  1632. struct TCB_t * iftmp.106_4;
  1633. struct TCB_t * iftmp.106_6;
  1634. UBaseType_t _11;
  1635. <bb 2> :
  1636. if (xTask_3(D) == 0B)
  1637. goto <bb 3>; [INV]
  1638. else
  1639. goto <bb 4>; [INV]
  1640. <bb 3> :
  1641. iftmp.106_6 ={v} pxCurrentTCB;
  1642. goto <bb 5>; [INV]
  1643. <bb 4> :
  1644. iftmp.106_4 = xTask_3(D);
  1645. <bb 5> :
  1646. # iftmp.106_2 = PHI <iftmp.106_6(3), iftmp.106_4(4)>
  1647. pxTCB_7 = iftmp.106_2;
  1648. pucEndOfStack_8 = pxTCB_7->pxStack;
  1649. _1 = prvTaskCheckFreeStackSpace (pucEndOfStack_8);
  1650. uxReturn_10 = (UBaseType_t) _1;
  1651. _11 = uxReturn_10;
  1652. <bb 6> :
  1653. <L3>:
  1654. return _11;
  1655. }
  1656. prvTaskCheckFreeStackSpace (const uint8_t * pucStackByte)
  1657. {
  1658. uint32_t ulCount;
  1659. uint16_t D.8001;
  1660. unsigned char _1;
  1661. uint16_t _8;
  1662. <bb 2> :
  1663. ulCount_4 = 0;
  1664. goto <bb 4>; [INV]
  1665. <bb 3> :
  1666. pucStackByte_9 = pucStackByte_2 + 1;
  1667. ulCount_10 = ulCount_3 + 1;
  1668. <bb 4> :
  1669. # pucStackByte_2 = PHI <pucStackByte_5(D)(2), pucStackByte_9(3)>
  1670. # ulCount_3 = PHI <ulCount_4(2), ulCount_10(3)>
  1671. _1 = *pucStackByte_2;
  1672. if (_1 == 165)
  1673. goto <bb 3>; [INV]
  1674. else
  1675. goto <bb 5>; [INV]
  1676. <bb 5> :
  1677. ulCount_7 = ulCount_3 / 4;
  1678. _8 = (uint16_t) ulCount_7;
  1679. <bb 6> :
  1680. <L3>:
  1681. return _8;
  1682. }
  1683. prvListTasksWithinSingleList (struct TaskStatus_t * pxTaskStatusArray, struct List_t * pxList, eTaskState eState)
  1684. {
  1685. struct List_t * const pxConstList;
  1686. struct List_t * const pxConstList;
  1687. UBaseType_t uxTask;
  1688. struct TCB_t * pxFirstTCB;
  1689. struct TCB_t * pxNextTCB;
  1690. UBaseType_t D.7999;
  1691. long unsigned int _1;
  1692. struct ListItem_t * _2;
  1693. struct xLIST_ITEM * _3;
  1694. struct ListItem_t * _4;
  1695. struct MiniListItem_t * _5;
  1696. struct ListItem_t * _6;
  1697. struct xLIST_ITEM * _7;
  1698. struct ListItem_t * _8;
  1699. struct ListItem_t * _9;
  1700. struct xLIST_ITEM * _10;
  1701. struct ListItem_t * _11;
  1702. struct MiniListItem_t * _12;
  1703. struct ListItem_t * _13;
  1704. struct xLIST_ITEM * _14;
  1705. struct ListItem_t * _15;
  1706. long unsigned int _16;
  1707. struct TaskStatus_t * _17;
  1708. UBaseType_t _39;
  1709. <bb 2> :
  1710. uxTask_24 = 0;
  1711. _1 ={v} pxList_26(D)->uxNumberOfItems;
  1712. if (_1 != 0)
  1713. goto <bb 3>; [INV]
  1714. else
  1715. goto <bb 9>; [INV]
  1716. <bb 3> :
  1717. pxConstList_27 = pxList_26(D);
  1718. _2 = pxConstList_27->pxIndex;
  1719. _3 = _2->pxNext;
  1720. pxConstList_27->pxIndex = _3;
  1721. _4 = pxConstList_27->pxIndex;
  1722. _5 = &pxConstList_27->xListEnd;
  1723. if (_4 == _5)
  1724. goto <bb 4>; [INV]
  1725. else
  1726. goto <bb 5>; [INV]
  1727. <bb 4> :
  1728. _6 = pxConstList_27->pxIndex;
  1729. _7 = _6->pxNext;
  1730. pxConstList_27->pxIndex = _7;
  1731. <bb 5> :
  1732. _8 = pxConstList_27->pxIndex;
  1733. pxFirstTCB_30 = _8->pvOwner;
  1734. <bb 6> :
  1735. # uxTask_18 = PHI <uxTask_24(5), uxTask_38(8)>
  1736. pxConstList_31 = pxList_26(D);
  1737. _9 = pxConstList_31->pxIndex;
  1738. _10 = _9->pxNext;
  1739. pxConstList_31->pxIndex = _10;
  1740. _11 = pxConstList_31->pxIndex;
  1741. _12 = &pxConstList_31->xListEnd;
  1742. if (_11 == _12)
  1743. goto <bb 7>; [INV]
  1744. else
  1745. goto <bb 8>; [INV]
  1746. <bb 7> :
  1747. _13 = pxConstList_31->pxIndex;
  1748. _14 = _13->pxNext;
  1749. pxConstList_31->pxIndex = _14;
  1750. <bb 8> :
  1751. _15 = pxConstList_31->pxIndex;
  1752. pxNextTCB_34 = _15->pvOwner;
  1753. _16 = uxTask_18 * 36;
  1754. _17 = pxTaskStatusArray_35(D) + _16;
  1755. vTaskGetInfo (pxNextTCB_34, _17, 1, eState_36(D));
  1756. uxTask_38 = uxTask_18 + 1;
  1757. if (pxNextTCB_34 != pxFirstTCB_30)
  1758. goto <bb 6>; [INV]
  1759. else
  1760. goto <bb 9>; [INV]
  1761. <bb 9> :
  1762. # uxTask_19 = PHI <uxTask_24(2), uxTask_38(8)>
  1763. _39 = uxTask_19;
  1764. <bb 10> :
  1765. <L9>:
  1766. return _39;
  1767. }
  1768. vTaskGetInfo (struct tskTaskControlBlock * xTask, struct TaskStatus_t * pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState)
  1769. {
  1770. struct TCB_t * pxTCB;
  1771. struct TCB_t * iftmp.104;
  1772. char * _1;
  1773. long unsigned int _2;
  1774. StackType_t * _3;
  1775. long unsigned int _4;
  1776. long unsigned int _5;
  1777. struct TCB_t * pxCurrentTCB.105_6;
  1778. struct xLIST * _7;
  1779. <unnamed type> _8;
  1780. StackType_t * _9;
  1781. short unsigned int _10;
  1782. struct TCB_t * iftmp.104_11;
  1783. struct TCB_t * iftmp.104_16;
  1784. struct TCB_t * iftmp.104_18;
  1785. <bb 2> :
  1786. if (xTask_15(D) == 0B)
  1787. goto <bb 3>; [INV]
  1788. else
  1789. goto <bb 4>; [INV]
  1790. <bb 3> :
  1791. iftmp.104_18 ={v} pxCurrentTCB;
  1792. goto <bb 5>; [INV]
  1793. <bb 4> :
  1794. iftmp.104_16 = xTask_15(D);
  1795. <bb 5> :
  1796. # iftmp.104_11 = PHI <iftmp.104_18(3), iftmp.104_16(4)>
  1797. pxTCB_19 = iftmp.104_11;
  1798. pxTaskStatus_20(D)->xHandle = pxTCB_19;
  1799. _1 = &pxTCB_19->pcTaskName[0];
  1800. pxTaskStatus_20(D)->pcTaskName = _1;
  1801. _2 = pxTCB_19->uxPriority;
  1802. pxTaskStatus_20(D)->uxCurrentPriority = _2;
  1803. _3 = pxTCB_19->pxStack;
  1804. pxTaskStatus_20(D)->pxStackBase = _3;
  1805. _4 = pxTCB_19->uxTCBNumber;
  1806. pxTaskStatus_20(D)->xTaskNumber = _4;
  1807. _5 = pxTCB_19->uxBasePriority;
  1808. pxTaskStatus_20(D)->uxBasePriority = _5;
  1809. pxTaskStatus_20(D)->ulRunTimeCounter = 0;
  1810. if (eState_28(D) != 5)
  1811. goto <bb 6>; [INV]
  1812. else
  1813. goto <bb 12>; [INV]
  1814. <bb 6> :
  1815. pxCurrentTCB.105_6 ={v} pxCurrentTCB;
  1816. if (pxTCB_19 == pxCurrentTCB.105_6)
  1817. goto <bb 7>; [INV]
  1818. else
  1819. goto <bb 8>; [INV]
  1820. <bb 7> :
  1821. pxTaskStatus_20(D)->eCurrentState = 0;
  1822. goto <bb 13>; [INV]
  1823. <bb 8> :
  1824. pxTaskStatus_20(D)->eCurrentState = eState_28(D);
  1825. if (eState_28(D) == 3)
  1826. goto <bb 9>; [INV]
  1827. else
  1828. goto <bb 13>; [INV]
  1829. <bb 9> :
  1830. vTaskSuspendAll ();
  1831. _7 = pxTCB_19->xEventListItem.pvContainer;
  1832. if (_7 != 0B)
  1833. goto <bb 10>; [INV]
  1834. else
  1835. goto <bb 11>; [INV]
  1836. <bb 10> :
  1837. pxTaskStatus_20(D)->eCurrentState = 2;
  1838. <bb 11> :
  1839. xTaskResumeAll ();
  1840. goto <bb 13>; [INV]
  1841. <bb 12> :
  1842. _8 = eTaskGetState (pxTCB_19);
  1843. pxTaskStatus_20(D)->eCurrentState = _8;
  1844. <bb 13> :
  1845. if (xGetFreeStackSpace_36(D) != 0)
  1846. goto <bb 14>; [INV]
  1847. else
  1848. goto <bb 15>; [INV]
  1849. <bb 14> :
  1850. _9 = pxTCB_19->pxStack;
  1851. _10 = prvTaskCheckFreeStackSpace (_9);
  1852. pxTaskStatus_20(D)->usStackHighWaterMark = _10;
  1853. goto <bb 16>; [INV]
  1854. <bb 15> :
  1855. pxTaskStatus_20(D)->usStackHighWaterMark = 0;
  1856. <bb 16> :
  1857. return;
  1858. }
  1859. prvCheckTasksWaitingTermination ()
  1860. {
  1861. struct TCB_t * pxTCB;
  1862. struct xLIST_ITEM * _1;
  1863. struct ListItem_t * _2;
  1864. long unsigned int uxCurrentNumberOfTasks.101_3;
  1865. long unsigned int _4;
  1866. long unsigned int uxDeletedTasksWaitingCleanUp.102_5;
  1867. long unsigned int _6;
  1868. long unsigned int uxDeletedTasksWaitingCleanUp.103_7;
  1869. <bb 2> :
  1870. goto <bb 4>; [INV]
  1871. <bb 3> :
  1872. vPortEnterCritical ();
  1873. _1 = xTasksWaitingTermination.xListEnd.pxNext;
  1874. pxTCB_11 = _1->pvOwner;
  1875. _2 = &pxTCB_11->xStateListItem;
  1876. uxListRemove (_2);
  1877. uxCurrentNumberOfTasks.101_3 ={v} uxCurrentNumberOfTasks;
  1878. _4 = uxCurrentNumberOfTasks.101_3 + 4294967295;
  1879. uxCurrentNumberOfTasks ={v} _4;
  1880. uxDeletedTasksWaitingCleanUp.102_5 ={v} uxDeletedTasksWaitingCleanUp;
  1881. _6 = uxDeletedTasksWaitingCleanUp.102_5 + 4294967295;
  1882. uxDeletedTasksWaitingCleanUp ={v} _6;
  1883. vPortExitCritical ();
  1884. prvDeleteTCB (pxTCB_11);
  1885. <bb 4> :
  1886. uxDeletedTasksWaitingCleanUp.103_7 ={v} uxDeletedTasksWaitingCleanUp;
  1887. if (uxDeletedTasksWaitingCleanUp.103_7 != 0)
  1888. goto <bb 3>; [INV]
  1889. else
  1890. goto <bb 5>; [INV]
  1891. <bb 5> :
  1892. return;
  1893. }
  1894. prvInitialiseTaskLists ()
  1895. {
  1896. UBaseType_t uxPriority;
  1897. struct List_t * _1;
  1898. <bb 2> :
  1899. uxPriority_4 = 0;
  1900. goto <bb 4>; [INV]
  1901. <bb 3> :
  1902. _1 = &pxReadyTasksLists[uxPriority_2];
  1903. vListInitialise (_1);
  1904. uxPriority_14 = uxPriority_2 + 1;
  1905. <bb 4> :
  1906. # uxPriority_2 = PHI <uxPriority_4(2), uxPriority_14(3)>
  1907. if (uxPriority_2 <= 4)
  1908. goto <bb 3>; [INV]
  1909. else
  1910. goto <bb 5>; [INV]
  1911. <bb 5> :
  1912. vListInitialise (&xDelayedTaskList1);
  1913. vListInitialise (&xDelayedTaskList2);
  1914. vListInitialise (&xPendingReadyList);
  1915. vListInitialise (&xTasksWaitingTermination);
  1916. vListInitialise (&xSuspendedTaskList);
  1917. pxDelayedTaskList ={v} &xDelayedTaskList1;
  1918. pxOverflowDelayedTaskList ={v} &xDelayedTaskList2;
  1919. return;
  1920. }
  1921. prvIdleTask (void * pvParameters)
  1922. {
  1923. long unsigned int _1;
  1924. volatile uint32_t * _2;
  1925. <bb 2> :
  1926. prvCheckTasksWaitingTermination ();
  1927. _1 ={v} pxReadyTasksLists[0].uxNumberOfItems;
  1928. if (_1 > 1)
  1929. goto <bb 3>; [INV]
  1930. else
  1931. goto <bb 4>; [INV]
  1932. <bb 3> :
  1933. _2 = 3758157060B;
  1934. *_2 ={v} 268435456;
  1935. __asm__ __volatile__("dsb" : : : "memory");
  1936. __asm__ __volatile__("isb");
  1937. <bb 4> :
  1938. goto <bb 2>; [INV]
  1939. }
  1940. vTaskSetTaskNumber (struct tskTaskControlBlock * xTask, const UBaseType_t uxHandle)
  1941. {
  1942. struct TCB_t * pxTCB;
  1943. <bb 2> :
  1944. if (xTask_2(D) != 0B)
  1945. goto <bb 3>; [INV]
  1946. else
  1947. goto <bb 4>; [INV]
  1948. <bb 3> :
  1949. pxTCB_4 = xTask_2(D);
  1950. pxTCB_4->uxTaskNumber = uxHandle_5(D);
  1951. <bb 4> :
  1952. return;
  1953. }
  1954. uxTaskGetTaskNumber (struct tskTaskControlBlock * xTask)
  1955. {
  1956. const struct TCB_t * pxTCB;
  1957. UBaseType_t uxReturn;
  1958. UBaseType_t D.7968;
  1959. UBaseType_t _7;
  1960. <bb 2> :
  1961. if (xTask_2(D) != 0B)
  1962. goto <bb 3>; [INV]
  1963. else
  1964. goto <bb 4>; [INV]
  1965. <bb 3> :
  1966. pxTCB_4 = xTask_2(D);
  1967. uxReturn_6 = pxTCB_4->uxTaskNumber;
  1968. goto <bb 5>; [INV]
  1969. <bb 4> :
  1970. uxReturn_3 = 0;
  1971. <bb 5> :
  1972. # uxReturn_1 = PHI <uxReturn_6(3), uxReturn_3(4)>
  1973. _7 = uxReturn_1;
  1974. <bb 6> :
  1975. <L3>:
  1976. return _7;
  1977. }
  1978. vTaskMissedYield ()
  1979. {
  1980. <bb 2> :
  1981. xYieldPending ={v} 1;
  1982. return;
  1983. }
  1984. xTaskCheckForTimeOut (struct TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait)
  1985. {
  1986. const TickType_t xElapsedTime;
  1987. const TickType_t xConstTickCount;
  1988. BaseType_t xReturn;
  1989. BaseType_t D.7963;
  1990. long unsigned int _1;
  1991. struct TCB_t * pxCurrentTCB.98_2;
  1992. unsigned char _3;
  1993. struct TCB_t * pxCurrentTCB.99_4;
  1994. long unsigned int _5;
  1995. long int _6;
  1996. long int xNumOfOverflows.100_7;
  1997. long unsigned int _8;
  1998. long unsigned int _9;
  1999. long unsigned int _10;
  2000. long unsigned int _11;
  2001. BaseType_t _31;
  2002. <bb 2> :
  2003. if (pxTimeOut_14(D) == 0B)
  2004. goto <bb 3>; [INV]
  2005. else
  2006. goto <bb 5>; [INV]
  2007. <bb 3> :
  2008. vPortRaiseBASEPRI ();
  2009. <bb 4> :
  2010. goto <bb 4>; [INV]
  2011. <bb 5> :
  2012. if (pxTicksToWait_15(D) == 0B)
  2013. goto <bb 6>; [INV]
  2014. else
  2015. goto <bb 8>; [INV]
  2016. <bb 6> :
  2017. vPortRaiseBASEPRI ();
  2018. <bb 7> :
  2019. goto <bb 7>; [INV]
  2020. <bb 8> :
  2021. vPortEnterCritical ();
  2022. xConstTickCount_18 ={v} xTickCount;
  2023. _1 = pxTimeOut_14(D)->xTimeOnEntering;
  2024. xElapsedTime_19 = xConstTickCount_18 - _1;
  2025. pxCurrentTCB.98_2 ={v} pxCurrentTCB;
  2026. _3 = pxCurrentTCB.98_2->ucDelayAborted;
  2027. if (_3 != 0)
  2028. goto <bb 9>; [INV]
  2029. else
  2030. goto <bb 10>; [INV]
  2031. <bb 9> :
  2032. pxCurrentTCB.99_4 ={v} pxCurrentTCB;
  2033. pxCurrentTCB.99_4->ucDelayAborted = 0;
  2034. xReturn_29 = 1;
  2035. goto <bb 18>; [INV]
  2036. <bb 10> :
  2037. _5 = *pxTicksToWait_15(D);
  2038. if (_5 == 4294967295)
  2039. goto <bb 11>; [INV]
  2040. else
  2041. goto <bb 12>; [INV]
  2042. <bb 11> :
  2043. xReturn_27 = 0;
  2044. goto <bb 18>; [INV]
  2045. <bb 12> :
  2046. _6 = pxTimeOut_14(D)->xOverflowCount;
  2047. xNumOfOverflows.100_7 ={v} xNumOfOverflows;
  2048. if (_6 != xNumOfOverflows.100_7)
  2049. goto <bb 13>; [INV]
  2050. else
  2051. goto <bb 15>; [INV]
  2052. <bb 13> :
  2053. _8 = pxTimeOut_14(D)->xTimeOnEntering;
  2054. if (xConstTickCount_18 >= _8)
  2055. goto <bb 14>; [INV]
  2056. else
  2057. goto <bb 15>; [INV]
  2058. <bb 14> :
  2059. xReturn_20 = 1;
  2060. *pxTicksToWait_15(D) = 0;
  2061. goto <bb 18>; [INV]
  2062. <bb 15> :
  2063. _9 = *pxTicksToWait_15(D);
  2064. if (xElapsedTime_19 < _9)
  2065. goto <bb 16>; [INV]
  2066. else
  2067. goto <bb 17>; [INV]
  2068. <bb 16> :
  2069. _10 = *pxTicksToWait_15(D);
  2070. _11 = _10 - xElapsedTime_19;
  2071. *pxTicksToWait_15(D) = _11;
  2072. vTaskInternalSetTimeOutState (pxTimeOut_14(D));
  2073. xReturn_26 = 0;
  2074. goto <bb 18>; [INV]
  2075. <bb 17> :
  2076. *pxTicksToWait_15(D) = 0;
  2077. xReturn_23 = 1;
  2078. <bb 18> :
  2079. # xReturn_12 = PHI <xReturn_29(9), xReturn_27(11), xReturn_20(14), xReturn_26(16), xReturn_23(17)>
  2080. vPortExitCritical ();
  2081. _31 = xReturn_12;
  2082. <bb 19> :
  2083. <L19>:
  2084. return _31;
  2085. }
  2086. vTaskInternalSetTimeOutState (struct TimeOut_t * const pxTimeOut)
  2087. {
  2088. long int xNumOfOverflows.96_1;
  2089. long unsigned int xTickCount.97_2;
  2090. <bb 2> :
  2091. xNumOfOverflows.96_1 ={v} xNumOfOverflows;
  2092. pxTimeOut_4(D)->xOverflowCount = xNumOfOverflows.96_1;
  2093. xTickCount.97_2 ={v} xTickCount;
  2094. pxTimeOut_4(D)->xTimeOnEntering = xTickCount.97_2;
  2095. return;
  2096. }
  2097. vTaskSetTimeOutState (struct TimeOut_t * const pxTimeOut)
  2098. {
  2099. long int xNumOfOverflows.94_1;
  2100. long unsigned int xTickCount.95_2;
  2101. <bb 2> :
  2102. if (pxTimeOut_3(D) == 0B)
  2103. goto <bb 3>; [INV]
  2104. else
  2105. goto <bb 5>; [INV]
  2106. <bb 3> :
  2107. vPortRaiseBASEPRI ();
  2108. <bb 4> :
  2109. goto <bb 4>; [INV]
  2110. <bb 5> :
  2111. vPortEnterCritical ();
  2112. xNumOfOverflows.94_1 ={v} xNumOfOverflows;
  2113. pxTimeOut_3(D)->xOverflowCount = xNumOfOverflows.94_1;
  2114. xTickCount.95_2 ={v} xTickCount;
  2115. pxTimeOut_3(D)->xTimeOnEntering = xTickCount.95_2;
  2116. vPortExitCritical ();
  2117. return;
  2118. }
  2119. vTaskRemoveFromUnorderedEventList (struct ListItem_t * pxEventListItem, const TickType_t xItemValue)
  2120. {
  2121. struct ListItem_t * const pxIndex;
  2122. struct List_t * const pxList;
  2123. struct List_t * const pxList;
  2124. struct TCB_t * pxUnblockedTCB;
  2125. long unsigned int uxSchedulerSuspended.91_1;
  2126. long unsigned int _2;
  2127. struct xLIST_ITEM * _3;
  2128. struct xLIST_ITEM * _4;
  2129. struct xLIST_ITEM * _5;
  2130. struct xLIST_ITEM * _6;
  2131. struct ListItem_t * _7;
  2132. struct xLIST_ITEM * _8;
  2133. long unsigned int _9;
  2134. long unsigned int _10;
  2135. struct xLIST_ITEM * _11;
  2136. struct xLIST_ITEM * _12;
  2137. struct xLIST_ITEM * _13;
  2138. struct xLIST_ITEM * _14;
  2139. struct ListItem_t * _15;
  2140. struct ListItem_t * _16;
  2141. struct xLIST_ITEM * _17;
  2142. long unsigned int _18;
  2143. long unsigned int _19;
  2144. long unsigned int _20;
  2145. long unsigned int uxTopReadyPriority.92_21;
  2146. long unsigned int _22;
  2147. long unsigned int _23;
  2148. struct xLIST_ITEM * _24;
  2149. struct xLIST_ITEM * _25;
  2150. struct ListItem_t * _26;
  2151. struct ListItem_t * _27;
  2152. long unsigned int _28;
  2153. struct List_t * _29;
  2154. long unsigned int _30;
  2155. long unsigned int _31;
  2156. long unsigned int _32;
  2157. long unsigned int _33;
  2158. struct TCB_t * pxCurrentTCB.93_34;
  2159. long unsigned int _35;
  2160. <bb 2> :
  2161. uxSchedulerSuspended.91_1 ={v} uxSchedulerSuspended;
  2162. if (uxSchedulerSuspended.91_1 == 0)
  2163. goto <bb 3>; [INV]
  2164. else
  2165. goto <bb 5>; [INV]
  2166. <bb 3> :
  2167. vPortRaiseBASEPRI ();
  2168. <bb 4> :
  2169. goto <bb 4>; [INV]
  2170. <bb 5> :
  2171. _2 = xItemValue_41(D) | 2147483648;
  2172. pxEventListItem_42(D)->xItemValue = _2;
  2173. pxUnblockedTCB_44 = pxEventListItem_42(D)->pvOwner;
  2174. if (pxUnblockedTCB_44 == 0B)
  2175. goto <bb 6>; [INV]
  2176. else
  2177. goto <bb 8>; [INV]
  2178. <bb 6> :
  2179. vPortRaiseBASEPRI ();
  2180. <bb 7> :
  2181. goto <bb 7>; [INV]
  2182. <bb 8> :
  2183. pxList_45 = pxEventListItem_42(D)->pvContainer;
  2184. _3 = pxEventListItem_42(D)->pxNext;
  2185. _4 = pxEventListItem_42(D)->pxPrevious;
  2186. _3->pxPrevious = _4;
  2187. _5 = pxEventListItem_42(D)->pxPrevious;
  2188. _6 = pxEventListItem_42(D)->pxNext;
  2189. _5->pxNext = _6;
  2190. _7 = pxList_45->pxIndex;
  2191. if (pxEventListItem_42(D) == _7)
  2192. goto <bb 9>; [INV]
  2193. else
  2194. goto <bb 10>; [INV]
  2195. <bb 9> :
  2196. _8 = pxEventListItem_42(D)->pxPrevious;
  2197. pxList_45->pxIndex = _8;
  2198. <bb 10> :
  2199. pxEventListItem_42(D)->pvContainer = 0B;
  2200. _9 ={v} pxList_45->uxNumberOfItems;
  2201. _10 = _9 + 4294967295;
  2202. pxList_45->uxNumberOfItems ={v} _10;
  2203. pxList_51 = pxUnblockedTCB_44->xStateListItem.pvContainer;
  2204. _11 = pxUnblockedTCB_44->xStateListItem.pxNext;
  2205. _12 = pxUnblockedTCB_44->xStateListItem.pxPrevious;
  2206. _11->pxPrevious = _12;
  2207. _13 = pxUnblockedTCB_44->xStateListItem.pxPrevious;
  2208. _14 = pxUnblockedTCB_44->xStateListItem.pxNext;
  2209. _13->pxNext = _14;
  2210. _15 = pxList_51->pxIndex;
  2211. _16 = &pxUnblockedTCB_44->xStateListItem;
  2212. if (_15 == _16)
  2213. goto <bb 11>; [INV]
  2214. else
  2215. goto <bb 12>; [INV]
  2216. <bb 11> :
  2217. _17 = pxUnblockedTCB_44->xStateListItem.pxPrevious;
  2218. pxList_51->pxIndex = _17;
  2219. <bb 12> :
  2220. pxUnblockedTCB_44->xStateListItem.pvContainer = 0B;
  2221. _18 ={v} pxList_51->uxNumberOfItems;
  2222. _19 = _18 + 4294967295;
  2223. pxList_51->uxNumberOfItems ={v} _19;
  2224. _20 = pxUnblockedTCB_44->uxPriority;
  2225. uxTopReadyPriority.92_21 ={v} uxTopReadyPriority;
  2226. if (_20 > uxTopReadyPriority.92_21)
  2227. goto <bb 13>; [INV]
  2228. else
  2229. goto <bb 14>; [INV]
  2230. <bb 13> :
  2231. _22 = pxUnblockedTCB_44->uxPriority;
  2232. uxTopReadyPriority ={v} _22;
  2233. <bb 14> :
  2234. _23 = pxUnblockedTCB_44->uxPriority;
  2235. pxIndex_58 = pxReadyTasksLists[_23].pxIndex;
  2236. pxUnblockedTCB_44->xStateListItem.pxNext = pxIndex_58;
  2237. _24 = pxIndex_58->pxPrevious;
  2238. pxUnblockedTCB_44->xStateListItem.pxPrevious = _24;
  2239. _25 = pxIndex_58->pxPrevious;
  2240. _26 = &pxUnblockedTCB_44->xStateListItem;
  2241. _25->pxNext = _26;
  2242. _27 = &pxUnblockedTCB_44->xStateListItem;
  2243. pxIndex_58->pxPrevious = _27;
  2244. _28 = pxUnblockedTCB_44->uxPriority;
  2245. _29 = &pxReadyTasksLists[_28];
  2246. pxUnblockedTCB_44->xStateListItem.pvContainer = _29;
  2247. _30 = pxUnblockedTCB_44->uxPriority;
  2248. _31 ={v} pxReadyTasksLists[_30].uxNumberOfItems;
  2249. _32 = _31 + 1;
  2250. pxReadyTasksLists[_30].uxNumberOfItems ={v} _32;
  2251. _33 = pxUnblockedTCB_44->uxPriority;
  2252. pxCurrentTCB.93_34 ={v} pxCurrentTCB;
  2253. _35 = pxCurrentTCB.93_34->uxPriority;
  2254. if (_33 > _35)
  2255. goto <bb 15>; [INV]
  2256. else
  2257. goto <bb 16>; [INV]
  2258. <bb 15> :
  2259. xYieldPending ={v} 1;
  2260. <bb 16> :
  2261. return;
  2262. }
  2263. xTaskRemoveFromEventList (const struct List_t * const pxEventList)
  2264. {
  2265. struct ListItem_t * const pxIndex;
  2266. struct ListItem_t * const pxIndex;
  2267. struct List_t * const pxList;
  2268. struct List_t * const pxList;
  2269. BaseType_t xReturn;
  2270. struct TCB_t * pxUnblockedTCB;
  2271. BaseType_t D.7930;
  2272. struct xLIST_ITEM * _1;
  2273. struct xLIST_ITEM * _2;
  2274. struct xLIST_ITEM * _3;
  2275. struct xLIST_ITEM * _4;
  2276. struct xLIST_ITEM * _5;
  2277. struct ListItem_t * _6;
  2278. struct ListItem_t * _7;
  2279. struct xLIST_ITEM * _8;
  2280. long unsigned int _9;
  2281. long unsigned int _10;
  2282. long unsigned int uxSchedulerSuspended.88_11;
  2283. struct xLIST_ITEM * _12;
  2284. struct xLIST_ITEM * _13;
  2285. struct xLIST_ITEM * _14;
  2286. struct xLIST_ITEM * _15;
  2287. struct ListItem_t * _16;
  2288. struct ListItem_t * _17;
  2289. struct xLIST_ITEM * _18;
  2290. long unsigned int _19;
  2291. long unsigned int _20;
  2292. long unsigned int _21;
  2293. long unsigned int uxTopReadyPriority.89_22;
  2294. long unsigned int _23;
  2295. long unsigned int _24;
  2296. struct xLIST_ITEM * _25;
  2297. struct xLIST_ITEM * _26;
  2298. struct ListItem_t * _27;
  2299. struct ListItem_t * _28;
  2300. long unsigned int _29;
  2301. struct List_t * _30;
  2302. long unsigned int _31;
  2303. long unsigned int _32;
  2304. long unsigned int _33;
  2305. struct xLIST_ITEM * _34;
  2306. struct xLIST_ITEM * _35;
  2307. struct ListItem_t * _36;
  2308. struct ListItem_t * _37;
  2309. long unsigned int _38;
  2310. long unsigned int _39;
  2311. long unsigned int _40;
  2312. struct TCB_t * pxCurrentTCB.90_41;
  2313. long unsigned int _42;
  2314. BaseType_t _82;
  2315. <bb 2> :
  2316. _1 = pxEventList_50(D)->xListEnd.pxNext;
  2317. pxUnblockedTCB_51 = _1->pvOwner;
  2318. if (pxUnblockedTCB_51 == 0B)
  2319. goto <bb 3>; [INV]
  2320. else
  2321. goto <bb 5>; [INV]
  2322. <bb 3> :
  2323. vPortRaiseBASEPRI ();
  2324. <bb 4> :
  2325. goto <bb 4>; [INV]
  2326. <bb 5> :
  2327. pxList_52 = pxUnblockedTCB_51->xEventListItem.pvContainer;
  2328. _2 = pxUnblockedTCB_51->xEventListItem.pxNext;
  2329. _3 = pxUnblockedTCB_51->xEventListItem.pxPrevious;
  2330. _2->pxPrevious = _3;
  2331. _4 = pxUnblockedTCB_51->xEventListItem.pxPrevious;
  2332. _5 = pxUnblockedTCB_51->xEventListItem.pxNext;
  2333. _4->pxNext = _5;
  2334. _6 = pxList_52->pxIndex;
  2335. _7 = &pxUnblockedTCB_51->xEventListItem;
  2336. if (_6 == _7)
  2337. goto <bb 6>; [INV]
  2338. else
  2339. goto <bb 7>; [INV]
  2340. <bb 6> :
  2341. _8 = pxUnblockedTCB_51->xEventListItem.pxPrevious;
  2342. pxList_52->pxIndex = _8;
  2343. <bb 7> :
  2344. pxUnblockedTCB_51->xEventListItem.pvContainer = 0B;
  2345. _9 ={v} pxList_52->uxNumberOfItems;
  2346. _10 = _9 + 4294967295;
  2347. pxList_52->uxNumberOfItems ={v} _10;
  2348. uxSchedulerSuspended.88_11 ={v} uxSchedulerSuspended;
  2349. if (uxSchedulerSuspended.88_11 == 0)
  2350. goto <bb 8>; [INV]
  2351. else
  2352. goto <bb 13>; [INV]
  2353. <bb 8> :
  2354. pxList_65 = pxUnblockedTCB_51->xStateListItem.pvContainer;
  2355. _12 = pxUnblockedTCB_51->xStateListItem.pxNext;
  2356. _13 = pxUnblockedTCB_51->xStateListItem.pxPrevious;
  2357. _12->pxPrevious = _13;
  2358. _14 = pxUnblockedTCB_51->xStateListItem.pxPrevious;
  2359. _15 = pxUnblockedTCB_51->xStateListItem.pxNext;
  2360. _14->pxNext = _15;
  2361. _16 = pxList_65->pxIndex;
  2362. _17 = &pxUnblockedTCB_51->xStateListItem;
  2363. if (_16 == _17)
  2364. goto <bb 9>; [INV]
  2365. else
  2366. goto <bb 10>; [INV]
  2367. <bb 9> :
  2368. _18 = pxUnblockedTCB_51->xStateListItem.pxPrevious;
  2369. pxList_65->pxIndex = _18;
  2370. <bb 10> :
  2371. pxUnblockedTCB_51->xStateListItem.pvContainer = 0B;
  2372. _19 ={v} pxList_65->uxNumberOfItems;
  2373. _20 = _19 + 4294967295;
  2374. pxList_65->uxNumberOfItems ={v} _20;
  2375. _21 = pxUnblockedTCB_51->uxPriority;
  2376. uxTopReadyPriority.89_22 ={v} uxTopReadyPriority;
  2377. if (_21 > uxTopReadyPriority.89_22)
  2378. goto <bb 11>; [INV]
  2379. else
  2380. goto <bb 12>; [INV]
  2381. <bb 11> :
  2382. _23 = pxUnblockedTCB_51->uxPriority;
  2383. uxTopReadyPriority ={v} _23;
  2384. <bb 12> :
  2385. _24 = pxUnblockedTCB_51->uxPriority;
  2386. pxIndex_72 = pxReadyTasksLists[_24].pxIndex;
  2387. pxUnblockedTCB_51->xStateListItem.pxNext = pxIndex_72;
  2388. _25 = pxIndex_72->pxPrevious;
  2389. pxUnblockedTCB_51->xStateListItem.pxPrevious = _25;
  2390. _26 = pxIndex_72->pxPrevious;
  2391. _27 = &pxUnblockedTCB_51->xStateListItem;
  2392. _26->pxNext = _27;
  2393. _28 = &pxUnblockedTCB_51->xStateListItem;
  2394. pxIndex_72->pxPrevious = _28;
  2395. _29 = pxUnblockedTCB_51->uxPriority;
  2396. _30 = &pxReadyTasksLists[_29];
  2397. pxUnblockedTCB_51->xStateListItem.pvContainer = _30;
  2398. _31 = pxUnblockedTCB_51->uxPriority;
  2399. _32 ={v} pxReadyTasksLists[_31].uxNumberOfItems;
  2400. _33 = _32 + 1;
  2401. pxReadyTasksLists[_31].uxNumberOfItems ={v} _33;
  2402. goto <bb 14>; [INV]
  2403. <bb 13> :
  2404. pxIndex_58 = xPendingReadyList.pxIndex;
  2405. pxUnblockedTCB_51->xEventListItem.pxNext = pxIndex_58;
  2406. _34 = pxIndex_58->pxPrevious;
  2407. pxUnblockedTCB_51->xEventListItem.pxPrevious = _34;
  2408. _35 = pxIndex_58->pxPrevious;
  2409. _36 = &pxUnblockedTCB_51->xEventListItem;
  2410. _35->pxNext = _36;
  2411. _37 = &pxUnblockedTCB_51->xEventListItem;
  2412. pxIndex_58->pxPrevious = _37;
  2413. pxUnblockedTCB_51->xEventListItem.pvContainer = &xPendingReadyList;
  2414. _38 ={v} xPendingReadyList.uxNumberOfItems;
  2415. _39 = _38 + 1;
  2416. xPendingReadyList.uxNumberOfItems ={v} _39;
  2417. <bb 14> :
  2418. _40 = pxUnblockedTCB_51->uxPriority;
  2419. pxCurrentTCB.90_41 ={v} pxCurrentTCB;
  2420. _42 = pxCurrentTCB.90_41->uxPriority;
  2421. if (_40 > _42)
  2422. goto <bb 15>; [INV]
  2423. else
  2424. goto <bb 16>; [INV]
  2425. <bb 15> :
  2426. xReturn_80 = 1;
  2427. xYieldPending ={v} 1;
  2428. goto <bb 17>; [INV]
  2429. <bb 16> :
  2430. xReturn_79 = 0;
  2431. <bb 17> :
  2432. # xReturn_43 = PHI <xReturn_80(15), xReturn_79(16)>
  2433. _82 = xReturn_43;
  2434. <bb 18> :
  2435. <L15>:
  2436. return _82;
  2437. }
  2438. vTaskPlaceOnEventListRestricted (struct List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely)
  2439. {
  2440. struct ListItem_t * const pxIndex;
  2441. struct TCB_t * pxCurrentTCB.83_1;
  2442. struct TCB_t * pxCurrentTCB.84_2;
  2443. struct xLIST_ITEM * _3;
  2444. struct TCB_t * pxCurrentTCB.85_4;
  2445. struct xLIST_ITEM * _5;
  2446. struct ListItem_t * _6;
  2447. struct TCB_t * pxCurrentTCB.86_7;
  2448. struct ListItem_t * _8;
  2449. struct TCB_t * pxCurrentTCB.87_9;
  2450. long unsigned int _10;
  2451. long unsigned int _11;
  2452. <bb 2> :
  2453. if (pxEventList_13(D) == 0B)
  2454. goto <bb 3>; [INV]
  2455. else
  2456. goto <bb 5>; [INV]
  2457. <bb 3> :
  2458. vPortRaiseBASEPRI ();
  2459. <bb 4> :
  2460. goto <bb 4>; [INV]
  2461. <bb 5> :
  2462. pxIndex_15 = pxEventList_13(D)->pxIndex;
  2463. pxCurrentTCB.83_1 ={v} pxCurrentTCB;
  2464. pxCurrentTCB.83_1->xEventListItem.pxNext = pxIndex_15;
  2465. pxCurrentTCB.84_2 ={v} pxCurrentTCB;
  2466. _3 = pxIndex_15->pxPrevious;
  2467. pxCurrentTCB.84_2->xEventListItem.pxPrevious = _3;
  2468. pxCurrentTCB.85_4 ={v} pxCurrentTCB;
  2469. _5 = pxIndex_15->pxPrevious;
  2470. _6 = &pxCurrentTCB.85_4->xEventListItem;
  2471. _5->pxNext = _6;
  2472. pxCurrentTCB.86_7 ={v} pxCurrentTCB;
  2473. _8 = &pxCurrentTCB.86_7->xEventListItem;
  2474. pxIndex_15->pxPrevious = _8;
  2475. pxCurrentTCB.87_9 ={v} pxCurrentTCB;
  2476. pxCurrentTCB.87_9->xEventListItem.pvContainer = pxEventList_13(D);
  2477. _10 ={v} pxEventList_13(D)->uxNumberOfItems;
  2478. _11 = _10 + 1;
  2479. pxEventList_13(D)->uxNumberOfItems ={v} _11;
  2480. if (xWaitIndefinitely_22(D) != 0)
  2481. goto <bb 6>; [INV]
  2482. else
  2483. goto <bb 7>; [INV]
  2484. <bb 6> :
  2485. xTicksToWait_24 = 4294967295;
  2486. <bb 7> :
  2487. # xTicksToWait_12 = PHI <xTicksToWait_23(D)(5), xTicksToWait_24(6)>
  2488. prvAddCurrentTaskToDelayedList (xTicksToWait_12, xWaitIndefinitely_22(D));
  2489. return;
  2490. }
  2491. vTaskPlaceOnUnorderedEventList (struct List_t * pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait)
  2492. {
  2493. struct ListItem_t * const pxIndex;
  2494. long unsigned int uxSchedulerSuspended.76_1;
  2495. struct TCB_t * pxCurrentTCB.77_2;
  2496. long unsigned int _3;
  2497. struct TCB_t * pxCurrentTCB.78_4;
  2498. struct TCB_t * pxCurrentTCB.79_5;
  2499. struct xLIST_ITEM * _6;
  2500. struct TCB_t * pxCurrentTCB.80_7;
  2501. struct xLIST_ITEM * _8;
  2502. struct ListItem_t * _9;
  2503. struct TCB_t * pxCurrentTCB.81_10;
  2504. struct ListItem_t * _11;
  2505. struct TCB_t * pxCurrentTCB.82_12;
  2506. long unsigned int _13;
  2507. long unsigned int _14;
  2508. <bb 2> :
  2509. if (pxEventList_15(D) == 0B)
  2510. goto <bb 3>; [INV]
  2511. else
  2512. goto <bb 5>; [INV]
  2513. <bb 3> :
  2514. vPortRaiseBASEPRI ();
  2515. <bb 4> :
  2516. goto <bb 4>; [INV]
  2517. <bb 5> :
  2518. uxSchedulerSuspended.76_1 ={v} uxSchedulerSuspended;
  2519. if (uxSchedulerSuspended.76_1 == 0)
  2520. goto <bb 6>; [INV]
  2521. else
  2522. goto <bb 8>; [INV]
  2523. <bb 6> :
  2524. vPortRaiseBASEPRI ();
  2525. <bb 7> :
  2526. goto <bb 7>; [INV]
  2527. <bb 8> :
  2528. pxCurrentTCB.77_2 ={v} pxCurrentTCB;
  2529. _3 = xItemValue_17(D) | 2147483648;
  2530. pxCurrentTCB.77_2->xEventListItem.xItemValue = _3;
  2531. pxIndex_19 = pxEventList_15(D)->pxIndex;
  2532. pxCurrentTCB.78_4 ={v} pxCurrentTCB;
  2533. pxCurrentTCB.78_4->xEventListItem.pxNext = pxIndex_19;
  2534. pxCurrentTCB.79_5 ={v} pxCurrentTCB;
  2535. _6 = pxIndex_19->pxPrevious;
  2536. pxCurrentTCB.79_5->xEventListItem.pxPrevious = _6;
  2537. pxCurrentTCB.80_7 ={v} pxCurrentTCB;
  2538. _8 = pxIndex_19->pxPrevious;
  2539. _9 = &pxCurrentTCB.80_7->xEventListItem;
  2540. _8->pxNext = _9;
  2541. pxCurrentTCB.81_10 ={v} pxCurrentTCB;
  2542. _11 = &pxCurrentTCB.81_10->xEventListItem;
  2543. pxIndex_19->pxPrevious = _11;
  2544. pxCurrentTCB.82_12 ={v} pxCurrentTCB;
  2545. pxCurrentTCB.82_12->xEventListItem.pvContainer = pxEventList_15(D);
  2546. _13 ={v} pxEventList_15(D)->uxNumberOfItems;
  2547. _14 = _13 + 1;
  2548. pxEventList_15(D)->uxNumberOfItems ={v} _14;
  2549. prvAddCurrentTaskToDelayedList (xTicksToWait_26(D), 1);
  2550. return;
  2551. }
  2552. vTaskPlaceOnEventList (struct List_t * const pxEventList, const TickType_t xTicksToWait)
  2553. {
  2554. struct TCB_t * pxCurrentTCB.75_1;
  2555. struct ListItem_t * _2;
  2556. <bb 2> :
  2557. if (pxEventList_3(D) == 0B)
  2558. goto <bb 3>; [INV]
  2559. else
  2560. goto <bb 5>; [INV]
  2561. <bb 3> :
  2562. vPortRaiseBASEPRI ();
  2563. <bb 4> :
  2564. goto <bb 4>; [INV]
  2565. <bb 5> :
  2566. pxCurrentTCB.75_1 ={v} pxCurrentTCB;
  2567. _2 = &pxCurrentTCB.75_1->xEventListItem;
  2568. vListInsert (pxEventList_3(D), _2);
  2569. prvAddCurrentTaskToDelayedList (xTicksToWait_6(D), 1);
  2570. return;
  2571. }
  2572. __attribute__((used))
  2573. vTaskSwitchContext ()
  2574. {
  2575. struct List_t * const pxConstList;
  2576. UBaseType_t uxTopPriority;
  2577. long unsigned int uxSchedulerSuspended.74_1;
  2578. long unsigned int _2;
  2579. struct ListItem_t * _3;
  2580. struct xLIST_ITEM * _4;
  2581. struct ListItem_t * _5;
  2582. struct MiniListItem_t * _6;
  2583. struct ListItem_t * _7;
  2584. struct xLIST_ITEM * _8;
  2585. struct ListItem_t * _9;
  2586. void * _10;
  2587. <bb 2> :
  2588. uxSchedulerSuspended.74_1 ={v} uxSchedulerSuspended;
  2589. if (uxSchedulerSuspended.74_1 != 0)
  2590. goto <bb 3>; [INV]
  2591. else
  2592. goto <bb 4>; [INV]
  2593. <bb 3> :
  2594. xYieldPending ={v} 1;
  2595. goto <bb 13>; [INV]
  2596. <bb 4> :
  2597. xYieldPending ={v} 0;
  2598. uxTopPriority_16 ={v} uxTopReadyPriority;
  2599. goto <bb 9>; [INV]
  2600. <bb 5> :
  2601. if (uxTopPriority_11 == 0)
  2602. goto <bb 6>; [INV]
  2603. else
  2604. goto <bb 8>; [INV]
  2605. <bb 6> :
  2606. vPortRaiseBASEPRI ();
  2607. <bb 7> :
  2608. goto <bb 7>; [INV]
  2609. <bb 8> :
  2610. uxTopPriority_22 = uxTopPriority_11 + 4294967295;
  2611. <bb 9> :
  2612. # uxTopPriority_11 = PHI <uxTopPriority_16(4), uxTopPriority_22(8)>
  2613. _2 ={v} pxReadyTasksLists[uxTopPriority_11].uxNumberOfItems;
  2614. if (_2 == 0)
  2615. goto <bb 5>; [INV]
  2616. else
  2617. goto <bb 10>; [INV]
  2618. <bb 10> :
  2619. pxConstList_17 = &pxReadyTasksLists[uxTopPriority_11];
  2620. _3 = pxConstList_17->pxIndex;
  2621. _4 = _3->pxNext;
  2622. pxConstList_17->pxIndex = _4;
  2623. _5 = pxConstList_17->pxIndex;
  2624. _6 = &pxConstList_17->xListEnd;
  2625. if (_5 == _6)
  2626. goto <bb 11>; [INV]
  2627. else
  2628. goto <bb 12>; [INV]
  2629. <bb 11> :
  2630. _7 = pxConstList_17->pxIndex;
  2631. _8 = _7->pxNext;
  2632. pxConstList_17->pxIndex = _8;
  2633. <bb 12> :
  2634. _9 = pxConstList_17->pxIndex;
  2635. _10 = _9->pvOwner;
  2636. pxCurrentTCB ={v} _10;
  2637. uxTopReadyPriority ={v} uxTopPriority_11;
  2638. <bb 13> :
  2639. return;
  2640. }
  2641. xTaskIncrementTick ()
  2642. {
  2643. struct ListItem_t * const pxIndex;
  2644. struct List_t * const pxList;
  2645. struct List_t * const pxList;
  2646. struct List_t * pxTemp;
  2647. const TickType_t xConstTickCount;
  2648. BaseType_t xSwitchRequired;
  2649. TickType_t xItemValue;
  2650. struct TCB_t * pxTCB;
  2651. BaseType_t D.7897;
  2652. long unsigned int uxSchedulerSuspended.61_1;
  2653. long unsigned int xTickCount.62_2;
  2654. struct List_t * pxDelayedTaskList.63_3;
  2655. long unsigned int _4;
  2656. struct List_t * pxOverflowDelayedTaskList.64_5;
  2657. long int xNumOfOverflows.65_6;
  2658. long int _7;
  2659. long unsigned int xNextTaskUnblockTime.66_8;
  2660. struct List_t * pxDelayedTaskList.67_9;
  2661. long unsigned int _10;
  2662. struct List_t * pxDelayedTaskList.68_11;
  2663. struct xLIST_ITEM * _12;
  2664. struct xLIST_ITEM * _13;
  2665. struct xLIST_ITEM * _14;
  2666. struct xLIST_ITEM * _15;
  2667. struct xLIST_ITEM * _16;
  2668. struct ListItem_t * _17;
  2669. struct ListItem_t * _18;
  2670. struct xLIST_ITEM * _19;
  2671. long unsigned int _20;
  2672. long unsigned int _21;
  2673. struct xLIST * _22;
  2674. struct xLIST_ITEM * _23;
  2675. struct xLIST_ITEM * _24;
  2676. struct xLIST_ITEM * _25;
  2677. struct xLIST_ITEM * _26;
  2678. struct ListItem_t * _27;
  2679. struct ListItem_t * _28;
  2680. struct xLIST_ITEM * _29;
  2681. long unsigned int _30;
  2682. long unsigned int _31;
  2683. long unsigned int _32;
  2684. long unsigned int uxTopReadyPriority.69_33;
  2685. long unsigned int _34;
  2686. long unsigned int _35;
  2687. struct xLIST_ITEM * _36;
  2688. struct xLIST_ITEM * _37;
  2689. struct ListItem_t * _38;
  2690. struct ListItem_t * _39;
  2691. long unsigned int _40;
  2692. struct List_t * _41;
  2693. long unsigned int _42;
  2694. long unsigned int _43;
  2695. long unsigned int _44;
  2696. long unsigned int _45;
  2697. struct TCB_t * pxCurrentTCB.70_46;
  2698. long unsigned int _47;
  2699. struct TCB_t * pxCurrentTCB.71_48;
  2700. long unsigned int _49;
  2701. long unsigned int _50;
  2702. long int xYieldPending.72_51;
  2703. long unsigned int xPendedTicks.73_52;
  2704. long unsigned int _53;
  2705. BaseType_t _105;
  2706. <bb 2> :
  2707. xSwitchRequired_67 = 0;
  2708. uxSchedulerSuspended.61_1 ={v} uxSchedulerSuspended;
  2709. if (uxSchedulerSuspended.61_1 == 0)
  2710. goto <bb 3>; [INV]
  2711. else
  2712. goto <bb 28>; [INV]
  2713. <bb 3> :
  2714. xTickCount.62_2 ={v} xTickCount;
  2715. xConstTickCount_70 = xTickCount.62_2 + 1;
  2716. xTickCount ={v} xConstTickCount_70;
  2717. if (xConstTickCount_70 == 0)
  2718. goto <bb 4>; [INV]
  2719. else
  2720. goto <bb 8>; [INV]
  2721. <bb 4> :
  2722. pxDelayedTaskList.63_3 ={v} pxDelayedTaskList;
  2723. _4 ={v} pxDelayedTaskList.63_3->uxNumberOfItems;
  2724. if (_4 != 0)
  2725. goto <bb 5>; [INV]
  2726. else
  2727. goto <bb 7>; [INV]
  2728. <bb 5> :
  2729. vPortRaiseBASEPRI ();
  2730. <bb 6> :
  2731. goto <bb 6>; [INV]
  2732. <bb 7> :
  2733. pxTemp_72 ={v} pxDelayedTaskList;
  2734. pxOverflowDelayedTaskList.64_5 ={v} pxOverflowDelayedTaskList;
  2735. pxDelayedTaskList ={v} pxOverflowDelayedTaskList.64_5;
  2736. pxOverflowDelayedTaskList ={v} pxTemp_72;
  2737. xNumOfOverflows.65_6 ={v} xNumOfOverflows;
  2738. _7 = xNumOfOverflows.65_6 + 1;
  2739. xNumOfOverflows ={v} _7;
  2740. prvResetNextTaskUnblockTime ();
  2741. <bb 8> :
  2742. xNextTaskUnblockTime.66_8 ={v} xNextTaskUnblockTime;
  2743. if (xConstTickCount_70 >= xNextTaskUnblockTime.66_8)
  2744. goto <bb 9>; [INV]
  2745. else
  2746. goto <bb 24>; [INV]
  2747. <bb 9> :
  2748. # xSwitchRequired_54 = PHI <xSwitchRequired_67(8), xSwitchRequired_55(23)>
  2749. pxDelayedTaskList.67_9 ={v} pxDelayedTaskList;
  2750. _10 ={v} pxDelayedTaskList.67_9->uxNumberOfItems;
  2751. if (_10 == 0)
  2752. goto <bb 10>; [INV]
  2753. else
  2754. goto <bb 11>; [INV]
  2755. <bb 10> :
  2756. xNextTaskUnblockTime ={v} 4294967295;
  2757. goto <bb 24>; [INV]
  2758. <bb 11> :
  2759. pxDelayedTaskList.68_11 ={v} pxDelayedTaskList;
  2760. _12 = pxDelayedTaskList.68_11->xListEnd.pxNext;
  2761. pxTCB_78 = _12->pvOwner;
  2762. xItemValue_79 = pxTCB_78->xStateListItem.xItemValue;
  2763. if (xConstTickCount_70 < xItemValue_79)
  2764. goto <bb 12>; [INV]
  2765. else
  2766. goto <bb 13>; [INV]
  2767. <bb 12> :
  2768. xNextTaskUnblockTime ={v} xItemValue_79;
  2769. goto <bb 24>; [INV]
  2770. <bb 13> :
  2771. pxList_80 = pxTCB_78->xStateListItem.pvContainer;
  2772. _13 = pxTCB_78->xStateListItem.pxNext;
  2773. _14 = pxTCB_78->xStateListItem.pxPrevious;
  2774. _13->pxPrevious = _14;
  2775. _15 = pxTCB_78->xStateListItem.pxPrevious;
  2776. _16 = pxTCB_78->xStateListItem.pxNext;
  2777. _15->pxNext = _16;
  2778. _17 = pxList_80->pxIndex;
  2779. _18 = &pxTCB_78->xStateListItem;
  2780. if (_17 == _18)
  2781. goto <bb 14>; [INV]
  2782. else
  2783. goto <bb 15>; [INV]
  2784. <bb 14> :
  2785. _19 = pxTCB_78->xStateListItem.pxPrevious;
  2786. pxList_80->pxIndex = _19;
  2787. <bb 15> :
  2788. pxTCB_78->xStateListItem.pvContainer = 0B;
  2789. _20 ={v} pxList_80->uxNumberOfItems;
  2790. _21 = _20 + 4294967295;
  2791. pxList_80->uxNumberOfItems ={v} _21;
  2792. _22 = pxTCB_78->xEventListItem.pvContainer;
  2793. if (_22 != 0B)
  2794. goto <bb 16>; [INV]
  2795. else
  2796. goto <bb 19>; [INV]
  2797. <bb 16> :
  2798. pxList_86 = pxTCB_78->xEventListItem.pvContainer;
  2799. _23 = pxTCB_78->xEventListItem.pxNext;
  2800. _24 = pxTCB_78->xEventListItem.pxPrevious;
  2801. _23->pxPrevious = _24;
  2802. _25 = pxTCB_78->xEventListItem.pxPrevious;
  2803. _26 = pxTCB_78->xEventListItem.pxNext;
  2804. _25->pxNext = _26;
  2805. _27 = pxList_86->pxIndex;
  2806. _28 = &pxTCB_78->xEventListItem;
  2807. if (_27 == _28)
  2808. goto <bb 17>; [INV]
  2809. else
  2810. goto <bb 18>; [INV]
  2811. <bb 17> :
  2812. _29 = pxTCB_78->xEventListItem.pxPrevious;
  2813. pxList_86->pxIndex = _29;
  2814. <bb 18> :
  2815. pxTCB_78->xEventListItem.pvContainer = 0B;
  2816. _30 ={v} pxList_86->uxNumberOfItems;
  2817. _31 = _30 + 4294967295;
  2818. pxList_86->uxNumberOfItems ={v} _31;
  2819. <bb 19> :
  2820. _32 = pxTCB_78->uxPriority;
  2821. uxTopReadyPriority.69_33 ={v} uxTopReadyPriority;
  2822. if (_32 > uxTopReadyPriority.69_33)
  2823. goto <bb 20>; [INV]
  2824. else
  2825. goto <bb 21>; [INV]
  2826. <bb 20> :
  2827. _34 = pxTCB_78->uxPriority;
  2828. uxTopReadyPriority ={v} _34;
  2829. <bb 21> :
  2830. _35 = pxTCB_78->uxPriority;
  2831. pxIndex_93 = pxReadyTasksLists[_35].pxIndex;
  2832. pxTCB_78->xStateListItem.pxNext = pxIndex_93;
  2833. _36 = pxIndex_93->pxPrevious;
  2834. pxTCB_78->xStateListItem.pxPrevious = _36;
  2835. _37 = pxIndex_93->pxPrevious;
  2836. _38 = &pxTCB_78->xStateListItem;
  2837. _37->pxNext = _38;
  2838. _39 = &pxTCB_78->xStateListItem;
  2839. pxIndex_93->pxPrevious = _39;
  2840. _40 = pxTCB_78->uxPriority;
  2841. _41 = &pxReadyTasksLists[_40];
  2842. pxTCB_78->xStateListItem.pvContainer = _41;
  2843. _42 = pxTCB_78->uxPriority;
  2844. _43 ={v} pxReadyTasksLists[_42].uxNumberOfItems;
  2845. _44 = _43 + 1;
  2846. pxReadyTasksLists[_42].uxNumberOfItems ={v} _44;
  2847. _45 = pxTCB_78->uxPriority;
  2848. pxCurrentTCB.70_46 ={v} pxCurrentTCB;
  2849. _47 = pxCurrentTCB.70_46->uxPriority;
  2850. if (_45 >= _47)
  2851. goto <bb 22>; [INV]
  2852. else
  2853. goto <bb 23>; [INV]
  2854. <bb 22> :
  2855. xSwitchRequired_100 = 1;
  2856. <bb 23> :
  2857. # xSwitchRequired_55 = PHI <xSwitchRequired_54(21), xSwitchRequired_100(22)>
  2858. goto <bb 9>; [INV]
  2859. <bb 24> :
  2860. # xSwitchRequired_56 = PHI <xSwitchRequired_67(8), xSwitchRequired_54(10), xSwitchRequired_54(12)>
  2861. pxCurrentTCB.71_48 ={v} pxCurrentTCB;
  2862. _49 = pxCurrentTCB.71_48->uxPriority;
  2863. _50 ={v} pxReadyTasksLists[_49].uxNumberOfItems;
  2864. if (_50 > 1)
  2865. goto <bb 25>; [INV]
  2866. else
  2867. goto <bb 26>; [INV]
  2868. <bb 25> :
  2869. xSwitchRequired_103 = 1;
  2870. <bb 26> :
  2871. # xSwitchRequired_57 = PHI <xSwitchRequired_56(24), xSwitchRequired_103(25)>
  2872. xYieldPending.72_51 ={v} xYieldPending;
  2873. if (xYieldPending.72_51 != 0)
  2874. goto <bb 27>; [INV]
  2875. else
  2876. goto <bb 29>; [INV]
  2877. <bb 27> :
  2878. xSwitchRequired_104 = 1;
  2879. goto <bb 29>; [INV]
  2880. <bb 28> :
  2881. xPendedTicks.73_52 ={v} xPendedTicks;
  2882. _53 = xPendedTicks.73_52 + 1;
  2883. xPendedTicks ={v} _53;
  2884. <bb 29> :
  2885. # xSwitchRequired_58 = PHI <xSwitchRequired_104(27), xSwitchRequired_67(28), xSwitchRequired_57(26)>
  2886. _105 = xSwitchRequired_58;
  2887. <bb 30> :
  2888. <L35>:
  2889. return _105;
  2890. }
  2891. xTaskAbortDelay (struct tskTaskControlBlock * xTask)
  2892. {
  2893. struct ListItem_t * const pxIndex;
  2894. BaseType_t xReturn;
  2895. struct TCB_t * pxTCB;
  2896. BaseType_t D.7863;
  2897. <unnamed type> _1;
  2898. struct ListItem_t * _2;
  2899. struct xLIST * _3;
  2900. struct ListItem_t * _4;
  2901. long unsigned int _5;
  2902. long unsigned int uxTopReadyPriority.59_6;
  2903. long unsigned int _7;
  2904. long unsigned int _8;
  2905. struct xLIST_ITEM * _9;
  2906. struct xLIST_ITEM * _10;
  2907. struct ListItem_t * _11;
  2908. struct ListItem_t * _12;
  2909. long unsigned int _13;
  2910. struct List_t * _14;
  2911. long unsigned int _15;
  2912. long unsigned int _16;
  2913. long unsigned int _17;
  2914. long unsigned int _18;
  2915. struct TCB_t * pxCurrentTCB.60_19;
  2916. long unsigned int _20;
  2917. BaseType_t _47;
  2918. <bb 2> :
  2919. pxTCB_26 = xTask_25(D);
  2920. if (pxTCB_26 == 0B)
  2921. goto <bb 3>; [INV]
  2922. else
  2923. goto <bb 5>; [INV]
  2924. <bb 3> :
  2925. vPortRaiseBASEPRI ();
  2926. <bb 4> :
  2927. goto <bb 4>; [INV]
  2928. <bb 5> :
  2929. vTaskSuspendAll ();
  2930. _1 = eTaskGetState (xTask_25(D));
  2931. if (_1 == 2)
  2932. goto <bb 6>; [INV]
  2933. else
  2934. goto <bb 12>; [INV]
  2935. <bb 6> :
  2936. xReturn_31 = 1;
  2937. _2 = &pxTCB_26->xStateListItem;
  2938. uxListRemove (_2);
  2939. vPortEnterCritical ();
  2940. _3 = pxTCB_26->xEventListItem.pvContainer;
  2941. if (_3 != 0B)
  2942. goto <bb 7>; [INV]
  2943. else
  2944. goto <bb 8>; [INV]
  2945. <bb 7> :
  2946. _4 = &pxTCB_26->xEventListItem;
  2947. uxListRemove (_4);
  2948. pxTCB_26->ucDelayAborted = 1;
  2949. <bb 8> :
  2950. vPortExitCritical ();
  2951. _5 = pxTCB_26->uxPriority;
  2952. uxTopReadyPriority.59_6 ={v} uxTopReadyPriority;
  2953. if (_5 > uxTopReadyPriority.59_6)
  2954. goto <bb 9>; [INV]
  2955. else
  2956. goto <bb 10>; [INV]
  2957. <bb 9> :
  2958. _7 = pxTCB_26->uxPriority;
  2959. uxTopReadyPriority ={v} _7;
  2960. <bb 10> :
  2961. _8 = pxTCB_26->uxPriority;
  2962. pxIndex_38 = pxReadyTasksLists[_8].pxIndex;
  2963. pxTCB_26->xStateListItem.pxNext = pxIndex_38;
  2964. _9 = pxIndex_38->pxPrevious;
  2965. pxTCB_26->xStateListItem.pxPrevious = _9;
  2966. _10 = pxIndex_38->pxPrevious;
  2967. _11 = &pxTCB_26->xStateListItem;
  2968. _10->pxNext = _11;
  2969. _12 = &pxTCB_26->xStateListItem;
  2970. pxIndex_38->pxPrevious = _12;
  2971. _13 = pxTCB_26->uxPriority;
  2972. _14 = &pxReadyTasksLists[_13];
  2973. pxTCB_26->xStateListItem.pvContainer = _14;
  2974. _15 = pxTCB_26->uxPriority;
  2975. _16 ={v} pxReadyTasksLists[_15].uxNumberOfItems;
  2976. _17 = _16 + 1;
  2977. pxReadyTasksLists[_15].uxNumberOfItems ={v} _17;
  2978. _18 = pxTCB_26->uxPriority;
  2979. pxCurrentTCB.60_19 ={v} pxCurrentTCB;
  2980. _20 = pxCurrentTCB.60_19->uxPriority;
  2981. if (_18 > _20)
  2982. goto <bb 11>; [INV]
  2983. else
  2984. goto <bb 13>; [INV]
  2985. <bb 11> :
  2986. xYieldPending ={v} 1;
  2987. goto <bb 13>; [INV]
  2988. <bb 12> :
  2989. xReturn_30 = 0;
  2990. <bb 13> :
  2991. # xReturn_21 = PHI <xReturn_31(11), xReturn_30(12), xReturn_31(10)>
  2992. xTaskResumeAll ();
  2993. _47 = xReturn_21;
  2994. <bb 14> :
  2995. <L14>:
  2996. return _47;
  2997. }
  2998. xTaskCatchUpTicks (TickType_t xTicksToCatchUp)
  2999. {
  3000. BaseType_t xYieldOccurred;
  3001. BaseType_t D.7848;
  3002. long unsigned int uxSchedulerSuspended.57_1;
  3003. long unsigned int xPendedTicks.58_2;
  3004. long unsigned int _3;
  3005. BaseType_t _10;
  3006. <bb 2> :
  3007. uxSchedulerSuspended.57_1 ={v} uxSchedulerSuspended;
  3008. if (uxSchedulerSuspended.57_1 != 0)
  3009. goto <bb 3>; [INV]
  3010. else
  3011. goto <bb 5>; [INV]
  3012. <bb 3> :
  3013. vPortRaiseBASEPRI ();
  3014. <bb 4> :
  3015. goto <bb 4>; [INV]
  3016. <bb 5> :
  3017. vTaskSuspendAll ();
  3018. xPendedTicks.58_2 ={v} xPendedTicks;
  3019. _3 = xTicksToCatchUp_6(D) + xPendedTicks.58_2;
  3020. xPendedTicks ={v} _3;
  3021. xYieldOccurred_9 = xTaskResumeAll ();
  3022. _10 = xYieldOccurred_9;
  3023. <bb 6> :
  3024. <L3>:
  3025. return _10;
  3026. }
  3027. uxTaskGetSystemState (struct TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime)
  3028. {
  3029. UBaseType_t uxQueue;
  3030. UBaseType_t uxTask;
  3031. UBaseType_t D.7844;
  3032. long unsigned int D.7840;
  3033. long unsigned int D.7839;
  3034. long unsigned int D.7838;
  3035. long unsigned int D.7837;
  3036. long unsigned int D.7836;
  3037. long unsigned int uxCurrentNumberOfTasks.54_1;
  3038. long unsigned int _2;
  3039. struct TaskStatus_t * _3;
  3040. struct List_t * _4;
  3041. long unsigned int _5;
  3042. struct TaskStatus_t * _6;
  3043. struct List_t * pxDelayedTaskList.55_7;
  3044. long unsigned int _8;
  3045. struct TaskStatus_t * _9;
  3046. struct List_t * pxOverflowDelayedTaskList.56_10;
  3047. long unsigned int _11;
  3048. struct TaskStatus_t * _12;
  3049. long unsigned int _13;
  3050. struct TaskStatus_t * _14;
  3051. long unsigned int _28;
  3052. long unsigned int _31;
  3053. long unsigned int _34;
  3054. long unsigned int _37;
  3055. long unsigned int _40;
  3056. UBaseType_t _45;
  3057. <bb 2> :
  3058. uxTask_20 = 0;
  3059. uxQueue_21 = 5;
  3060. vTaskSuspendAll ();
  3061. uxCurrentNumberOfTasks.54_1 ={v} uxCurrentNumberOfTasks;
  3062. if (uxArraySize_24(D) >= uxCurrentNumberOfTasks.54_1)
  3063. goto <bb 3>; [INV]
  3064. else
  3065. goto <bb 6>; [INV]
  3066. <bb 3> :
  3067. # uxTask_15 = PHI <uxTask_20(2), uxTask_29(3)>
  3068. # uxQueue_17 = PHI <uxQueue_21(2), uxQueue_25(3)>
  3069. uxQueue_25 = uxQueue_17 + 4294967295;
  3070. _2 = uxTask_15 * 36;
  3071. _3 = pxTaskStatusArray_26(D) + _2;
  3072. _4 = &pxReadyTasksLists[uxQueue_25];
  3073. _28 = prvListTasksWithinSingleList (_3, _4, 1);
  3074. uxTask_29 = _28 + uxTask_15;
  3075. if (uxQueue_25 != 0)
  3076. goto <bb 3>; [INV]
  3077. else
  3078. goto <bb 4>; [INV]
  3079. <bb 4> :
  3080. _5 = uxTask_29 * 36;
  3081. _6 = pxTaskStatusArray_26(D) + _5;
  3082. pxDelayedTaskList.55_7 ={v} pxDelayedTaskList;
  3083. _31 = prvListTasksWithinSingleList (_6, pxDelayedTaskList.55_7, 2);
  3084. uxTask_32 = _31 + uxTask_29;
  3085. _8 = uxTask_32 * 36;
  3086. _9 = pxTaskStatusArray_26(D) + _8;
  3087. pxOverflowDelayedTaskList.56_10 ={v} pxOverflowDelayedTaskList;
  3088. _34 = prvListTasksWithinSingleList (_9, pxOverflowDelayedTaskList.56_10, 2);
  3089. uxTask_35 = _34 + uxTask_32;
  3090. _11 = uxTask_35 * 36;
  3091. _12 = pxTaskStatusArray_26(D) + _11;
  3092. _37 = prvListTasksWithinSingleList (_12, &xTasksWaitingTermination, 4);
  3093. uxTask_38 = _37 + uxTask_35;
  3094. _13 = uxTask_38 * 36;
  3095. _14 = pxTaskStatusArray_26(D) + _13;
  3096. _40 = prvListTasksWithinSingleList (_14, &xSuspendedTaskList, 3);
  3097. uxTask_41 = _40 + uxTask_38;
  3098. if (pulTotalRunTime_42(D) != 0B)
  3099. goto <bb 5>; [INV]
  3100. else
  3101. goto <bb 6>; [INV]
  3102. <bb 5> :
  3103. *pulTotalRunTime_42(D) = 0;
  3104. <bb 6> :
  3105. # uxTask_16 = PHI <uxTask_20(2), uxTask_41(5), uxTask_41(4)>
  3106. xTaskResumeAll ();
  3107. _45 = uxTask_16;
  3108. <bb 7> :
  3109. <L7>:
  3110. return _45;
  3111. }
  3112. xTaskGetHandle (const char * pcNameToQuery)
  3113. {
  3114. struct TCB_t * pxTCB;
  3115. UBaseType_t uxQueue;
  3116. struct tskTaskControlBlock * D.7832;
  3117. unsigned int _1;
  3118. struct List_t * _2;
  3119. struct List_t * pxDelayedTaskList.52_3;
  3120. struct List_t * pxOverflowDelayedTaskList.53_4;
  3121. struct tskTaskControlBlock * _31;
  3122. <bb 2> :
  3123. uxQueue_15 = 5;
  3124. _1 = strlen (pcNameToQuery_17(D));
  3125. if (_1 > 9)
  3126. goto <bb 3>; [INV]
  3127. else
  3128. goto <bb 5>; [INV]
  3129. <bb 3> :
  3130. vPortRaiseBASEPRI ();
  3131. <bb 4> :
  3132. goto <bb 4>; [INV]
  3133. <bb 5> :
  3134. vTaskSuspendAll ();
  3135. <bb 6> :
  3136. # uxQueue_5 = PHI <uxQueue_15(5), uxQueue_19(8)>
  3137. uxQueue_19 = uxQueue_5 + 4294967295;
  3138. _2 = &pxReadyTasksLists[uxQueue_19];
  3139. pxTCB_21 = prvSearchForNameWithinSingleList (_2, pcNameToQuery_17(D));
  3140. if (pxTCB_21 != 0B)
  3141. goto <bb 7>; [INV]
  3142. else
  3143. goto <bb 8>; [INV]
  3144. <bb 7> :
  3145. goto <bb 9>; [INV]
  3146. <bb 8> :
  3147. if (uxQueue_19 != 0)
  3148. goto <bb 6>; [INV]
  3149. else
  3150. goto <bb 9>; [INV]
  3151. <bb 9> :
  3152. if (pxTCB_21 == 0B)
  3153. goto <bb 10>; [INV]
  3154. else
  3155. goto <bb 11>; [INV]
  3156. <bb 10> :
  3157. pxDelayedTaskList.52_3 ={v} pxDelayedTaskList;
  3158. pxTCB_23 = prvSearchForNameWithinSingleList (pxDelayedTaskList.52_3, pcNameToQuery_17(D));
  3159. <bb 11> :
  3160. # pxTCB_6 = PHI <pxTCB_21(9), pxTCB_23(10)>
  3161. if (pxTCB_6 == 0B)
  3162. goto <bb 12>; [INV]
  3163. else
  3164. goto <bb 13>; [INV]
  3165. <bb 12> :
  3166. pxOverflowDelayedTaskList.53_4 ={v} pxOverflowDelayedTaskList;
  3167. pxTCB_25 = prvSearchForNameWithinSingleList (pxOverflowDelayedTaskList.53_4, pcNameToQuery_17(D));
  3168. <bb 13> :
  3169. # pxTCB_7 = PHI <pxTCB_6(11), pxTCB_25(12)>
  3170. if (pxTCB_7 == 0B)
  3171. goto <bb 14>; [INV]
  3172. else
  3173. goto <bb 15>; [INV]
  3174. <bb 14> :
  3175. pxTCB_27 = prvSearchForNameWithinSingleList (&xSuspendedTaskList, pcNameToQuery_17(D));
  3176. <bb 15> :
  3177. # pxTCB_8 = PHI <pxTCB_7(13), pxTCB_27(14)>
  3178. if (pxTCB_8 == 0B)
  3179. goto <bb 16>; [INV]
  3180. else
  3181. goto <bb 17>; [INV]
  3182. <bb 16> :
  3183. pxTCB_29 = prvSearchForNameWithinSingleList (&xTasksWaitingTermination, pcNameToQuery_17(D));
  3184. <bb 17> :
  3185. # pxTCB_9 = PHI <pxTCB_8(15), pxTCB_29(16)>
  3186. xTaskResumeAll ();
  3187. _31 = pxTCB_9;
  3188. <bb 18> :
  3189. <L15>:
  3190. return _31;
  3191. }
  3192. prvSearchForNameWithinSingleList (struct List_t * pxList, const char * pcNameToQuery)
  3193. {
  3194. struct List_t * const pxConstList;
  3195. struct List_t * const pxConstList;
  3196. BaseType_t xBreakLoop;
  3197. char cNextChar;
  3198. UBaseType_t x;
  3199. struct TCB_t * pxReturn;
  3200. struct TCB_t * pxFirstTCB;
  3201. struct TCB_t * pxNextTCB;
  3202. struct TCB_t * D.7818;
  3203. long unsigned int _1;
  3204. struct ListItem_t * _2;
  3205. struct xLIST_ITEM * _3;
  3206. struct ListItem_t * _4;
  3207. struct MiniListItem_t * _5;
  3208. struct ListItem_t * _6;
  3209. struct xLIST_ITEM * _7;
  3210. struct ListItem_t * _8;
  3211. struct ListItem_t * _9;
  3212. struct xLIST_ITEM * _10;
  3213. struct ListItem_t * _11;
  3214. struct MiniListItem_t * _12;
  3215. struct ListItem_t * _13;
  3216. struct xLIST_ITEM * _14;
  3217. struct ListItem_t * _15;
  3218. const char * _16;
  3219. char _17;
  3220. struct TCB_t * _49;
  3221. <bb 2> :
  3222. pxReturn_30 = 0B;
  3223. _1 ={v} pxList_32(D)->uxNumberOfItems;
  3224. if (_1 != 0)
  3225. goto <bb 3>; [INV]
  3226. else
  3227. goto <bb 21>; [INV]
  3228. <bb 3> :
  3229. pxConstList_33 = pxList_32(D);
  3230. _2 = pxConstList_33->pxIndex;
  3231. _3 = _2->pxNext;
  3232. pxConstList_33->pxIndex = _3;
  3233. _4 = pxConstList_33->pxIndex;
  3234. _5 = &pxConstList_33->xListEnd;
  3235. if (_4 == _5)
  3236. goto <bb 4>; [INV]
  3237. else
  3238. goto <bb 5>; [INV]
  3239. <bb 4> :
  3240. _6 = pxConstList_33->pxIndex;
  3241. _7 = _6->pxNext;
  3242. pxConstList_33->pxIndex = _7;
  3243. <bb 5> :
  3244. _8 = pxConstList_33->pxIndex;
  3245. pxFirstTCB_36 = _8->pvOwner;
  3246. <bb 6> :
  3247. # pxReturn_18 = PHI <pxReturn_30(5), pxReturn_21(19)>
  3248. pxConstList_37 = pxList_32(D);
  3249. _9 = pxConstList_37->pxIndex;
  3250. _10 = _9->pxNext;
  3251. pxConstList_37->pxIndex = _10;
  3252. _11 = pxConstList_37->pxIndex;
  3253. _12 = &pxConstList_37->xListEnd;
  3254. if (_11 == _12)
  3255. goto <bb 7>; [INV]
  3256. else
  3257. goto <bb 8>; [INV]
  3258. <bb 7> :
  3259. _13 = pxConstList_37->pxIndex;
  3260. _14 = _13->pxNext;
  3261. pxConstList_37->pxIndex = _14;
  3262. <bb 8> :
  3263. _15 = pxConstList_37->pxIndex;
  3264. pxNextTCB_40 = _15->pvOwner;
  3265. xBreakLoop_41 = 0;
  3266. x_42 = 0;
  3267. goto <bb 16>; [INV]
  3268. <bb 9> :
  3269. cNextChar_43 = pxNextTCB_40->pcTaskName[x_23];
  3270. _16 = pcNameToQuery_44(D) + x_23;
  3271. _17 = *_16;
  3272. if (cNextChar_43 != _17)
  3273. goto <bb 10>; [INV]
  3274. else
  3275. goto <bb 11>; [INV]
  3276. <bb 10> :
  3277. xBreakLoop_47 = 1;
  3278. goto <bb 13>; [INV]
  3279. <bb 11> :
  3280. if (cNextChar_43 == 0)
  3281. goto <bb 12>; [INV]
  3282. else
  3283. goto <bb 13>; [INV]
  3284. <bb 12> :
  3285. pxReturn_45 = pxNextTCB_40;
  3286. xBreakLoop_46 = 1;
  3287. <bb 13> :
  3288. # pxReturn_19 = PHI <pxReturn_20(10), pxReturn_20(11), pxReturn_45(12)>
  3289. # xBreakLoop_24 = PHI <xBreakLoop_47(10), xBreakLoop_25(11), xBreakLoop_46(12)>
  3290. if (xBreakLoop_24 != 0)
  3291. goto <bb 14>; [INV]
  3292. else
  3293. goto <bb 15>; [INV]
  3294. <bb 14> :
  3295. goto <bb 17>; [INV]
  3296. <bb 15> :
  3297. x_48 = x_23 + 1;
  3298. <bb 16> :
  3299. # pxReturn_20 = PHI <pxReturn_18(8), pxReturn_19(15)>
  3300. # x_23 = PHI <x_42(8), x_48(15)>
  3301. # xBreakLoop_25 = PHI <xBreakLoop_41(8), xBreakLoop_24(15)>
  3302. if (x_23 <= 9)
  3303. goto <bb 9>; [INV]
  3304. else
  3305. goto <bb 17>; [INV]
  3306. <bb 17> :
  3307. # pxReturn_21 = PHI <pxReturn_19(14), pxReturn_20(16)>
  3308. if (pxReturn_21 != 0B)
  3309. goto <bb 18>; [INV]
  3310. else
  3311. goto <bb 19>; [INV]
  3312. <bb 18> :
  3313. goto <bb 20>; [INV]
  3314. <bb 19> :
  3315. if (pxNextTCB_40 != pxFirstTCB_36)
  3316. goto <bb 6>; [INV]
  3317. else
  3318. goto <bb 20>; [INV]
  3319. <bb 20> :
  3320. <bb 21> :
  3321. # pxReturn_22 = PHI <pxReturn_30(2), pxReturn_21(20)>
  3322. _49 = pxReturn_22;
  3323. <bb 22> :
  3324. <L22>:
  3325. return _49;
  3326. }
  3327. pcTaskGetName (struct tskTaskControlBlock * xTaskToQuery)
  3328. {
  3329. struct TCB_t * pxTCB;
  3330. char * D.7799;
  3331. struct TCB_t * iftmp.51;
  3332. struct TCB_t * iftmp.51_1;
  3333. struct TCB_t * iftmp.51_3;
  3334. struct TCB_t * iftmp.51_5;
  3335. char * _7;
  3336. <bb 2> :
  3337. if (xTaskToQuery_2(D) == 0B)
  3338. goto <bb 3>; [INV]
  3339. else
  3340. goto <bb 4>; [INV]
  3341. <bb 3> :
  3342. iftmp.51_5 ={v} pxCurrentTCB;
  3343. goto <bb 5>; [INV]
  3344. <bb 4> :
  3345. iftmp.51_3 = xTaskToQuery_2(D);
  3346. <bb 5> :
  3347. # iftmp.51_1 = PHI <iftmp.51_5(3), iftmp.51_3(4)>
  3348. pxTCB_6 = iftmp.51_1;
  3349. if (pxTCB_6 == 0B)
  3350. goto <bb 6>; [INV]
  3351. else
  3352. goto <bb 8>; [INV]
  3353. <bb 6> :
  3354. vPortRaiseBASEPRI ();
  3355. <bb 7> :
  3356. goto <bb 7>; [INV]
  3357. <bb 8> :
  3358. _7 = &pxTCB_6->pcTaskName[0];
  3359. <bb 9> :
  3360. <L6>:
  3361. return _7;
  3362. }
  3363. uxTaskGetNumberOfTasks ()
  3364. {
  3365. UBaseType_t D.7791;
  3366. UBaseType_t _2;
  3367. <bb 2> :
  3368. _2 ={v} uxCurrentNumberOfTasks;
  3369. <bb 3> :
  3370. <L0>:
  3371. return _2;
  3372. }
  3373. xTaskGetTickCountFromISR ()
  3374. {
  3375. UBaseType_t uxSavedInterruptStatus;
  3376. TickType_t xReturn;
  3377. TickType_t D.7789;
  3378. TickType_t _5;
  3379. <bb 2> :
  3380. vPortValidateInterruptPriority ();
  3381. uxSavedInterruptStatus_3 = 0;
  3382. xReturn_4 ={v} xTickCount;
  3383. _5 = xReturn_4;
  3384. <bb 3> :
  3385. <L0>:
  3386. return _5;
  3387. }
  3388. xTaskGetTickCount ()
  3389. {
  3390. TickType_t xTicks;
  3391. TickType_t D.7787;
  3392. TickType_t _3;
  3393. <bb 2> :
  3394. xTicks_2 ={v} xTickCount;
  3395. _3 = xTicks_2;
  3396. <bb 3> :
  3397. <L0>:
  3398. return _3;
  3399. }
  3400. xTaskResumeAll ()
  3401. {
  3402. TickType_t xPendedCounts;
  3403. struct ListItem_t * const pxIndex;
  3404. struct List_t * const pxList;
  3405. struct List_t * const pxList;
  3406. BaseType_t xAlreadyYielded;
  3407. struct TCB_t * pxTCB;
  3408. BaseType_t D.7785;
  3409. long unsigned int uxSchedulerSuspended.44_1;
  3410. long unsigned int uxSchedulerSuspended.45_2;
  3411. long unsigned int _3;
  3412. long unsigned int uxSchedulerSuspended.46_4;
  3413. long unsigned int uxCurrentNumberOfTasks.47_5;
  3414. struct xLIST_ITEM * _6;
  3415. struct xLIST_ITEM * _7;
  3416. struct xLIST_ITEM * _8;
  3417. struct xLIST_ITEM * _9;
  3418. struct xLIST_ITEM * _10;
  3419. struct ListItem_t * _11;
  3420. struct ListItem_t * _12;
  3421. struct xLIST_ITEM * _13;
  3422. long unsigned int _14;
  3423. long unsigned int _15;
  3424. struct xLIST_ITEM * _16;
  3425. struct xLIST_ITEM * _17;
  3426. struct xLIST_ITEM * _18;
  3427. struct xLIST_ITEM * _19;
  3428. struct ListItem_t * _20;
  3429. struct ListItem_t * _21;
  3430. struct xLIST_ITEM * _22;
  3431. long unsigned int _23;
  3432. long unsigned int _24;
  3433. long unsigned int _25;
  3434. long unsigned int uxTopReadyPriority.48_26;
  3435. long unsigned int _27;
  3436. long unsigned int _28;
  3437. struct xLIST_ITEM * _29;
  3438. struct xLIST_ITEM * _30;
  3439. struct ListItem_t * _31;
  3440. struct ListItem_t * _32;
  3441. long unsigned int _33;
  3442. struct List_t * _34;
  3443. long unsigned int _35;
  3444. long unsigned int _36;
  3445. long unsigned int _37;
  3446. long unsigned int _38;
  3447. struct TCB_t * pxCurrentTCB.49_39;
  3448. long unsigned int _40;
  3449. long unsigned int _41;
  3450. long int _42;
  3451. long int xYieldPending.50_43;
  3452. volatile uint32_t * _44;
  3453. BaseType_t _96;
  3454. <bb 2> :
  3455. pxTCB_57 = 0B;
  3456. xAlreadyYielded_58 = 0;
  3457. uxSchedulerSuspended.44_1 ={v} uxSchedulerSuspended;
  3458. if (uxSchedulerSuspended.44_1 == 0)
  3459. goto <bb 3>; [INV]
  3460. else
  3461. goto <bb 5>; [INV]
  3462. <bb 3> :
  3463. vPortRaiseBASEPRI ();
  3464. <bb 4> :
  3465. goto <bb 4>; [INV]
  3466. <bb 5> :
  3467. vPortEnterCritical ();
  3468. uxSchedulerSuspended.45_2 ={v} uxSchedulerSuspended;
  3469. _3 = uxSchedulerSuspended.45_2 + 4294967295;
  3470. uxSchedulerSuspended ={v} _3;
  3471. uxSchedulerSuspended.46_4 ={v} uxSchedulerSuspended;
  3472. if (uxSchedulerSuspended.46_4 == 0)
  3473. goto <bb 6>; [INV]
  3474. else
  3475. goto <bb 26>; [INV]
  3476. <bb 6> :
  3477. uxCurrentNumberOfTasks.47_5 ={v} uxCurrentNumberOfTasks;
  3478. if (uxCurrentNumberOfTasks.47_5 != 0)
  3479. goto <bb 7>; [INV]
  3480. else
  3481. goto <bb 26>; [INV]
  3482. <bb 7> :
  3483. goto <bb 16>; [INV]
  3484. <bb 8> :
  3485. _6 = xPendingReadyList.xListEnd.pxNext;
  3486. pxTCB_72 = _6->pvOwner;
  3487. pxList_73 = pxTCB_72->xEventListItem.pvContainer;
  3488. _7 = pxTCB_72->xEventListItem.pxNext;
  3489. _8 = pxTCB_72->xEventListItem.pxPrevious;
  3490. _7->pxPrevious = _8;
  3491. _9 = pxTCB_72->xEventListItem.pxPrevious;
  3492. _10 = pxTCB_72->xEventListItem.pxNext;
  3493. _9->pxNext = _10;
  3494. _11 = pxList_73->pxIndex;
  3495. _12 = &pxTCB_72->xEventListItem;
  3496. if (_11 == _12)
  3497. goto <bb 9>; [INV]
  3498. else
  3499. goto <bb 10>; [INV]
  3500. <bb 9> :
  3501. _13 = pxTCB_72->xEventListItem.pxPrevious;
  3502. pxList_73->pxIndex = _13;
  3503. <bb 10> :
  3504. pxTCB_72->xEventListItem.pvContainer = 0B;
  3505. _14 ={v} pxList_73->uxNumberOfItems;
  3506. _15 = _14 + 4294967295;
  3507. pxList_73->uxNumberOfItems ={v} _15;
  3508. __asm__ __volatile__("" : : : "memory");
  3509. pxList_80 = pxTCB_72->xStateListItem.pvContainer;
  3510. _16 = pxTCB_72->xStateListItem.pxNext;
  3511. _17 = pxTCB_72->xStateListItem.pxPrevious;
  3512. _16->pxPrevious = _17;
  3513. _18 = pxTCB_72->xStateListItem.pxPrevious;
  3514. _19 = pxTCB_72->xStateListItem.pxNext;
  3515. _18->pxNext = _19;
  3516. _20 = pxList_80->pxIndex;
  3517. _21 = &pxTCB_72->xStateListItem;
  3518. if (_20 == _21)
  3519. goto <bb 11>; [INV]
  3520. else
  3521. goto <bb 12>; [INV]
  3522. <bb 11> :
  3523. _22 = pxTCB_72->xStateListItem.pxPrevious;
  3524. pxList_80->pxIndex = _22;
  3525. <bb 12> :
  3526. pxTCB_72->xStateListItem.pvContainer = 0B;
  3527. _23 ={v} pxList_80->uxNumberOfItems;
  3528. _24 = _23 + 4294967295;
  3529. pxList_80->uxNumberOfItems ={v} _24;
  3530. _25 = pxTCB_72->uxPriority;
  3531. uxTopReadyPriority.48_26 ={v} uxTopReadyPriority;
  3532. if (_25 > uxTopReadyPriority.48_26)
  3533. goto <bb 13>; [INV]
  3534. else
  3535. goto <bb 14>; [INV]
  3536. <bb 13> :
  3537. _27 = pxTCB_72->uxPriority;
  3538. uxTopReadyPriority ={v} _27;
  3539. <bb 14> :
  3540. _28 = pxTCB_72->uxPriority;
  3541. pxIndex_87 = pxReadyTasksLists[_28].pxIndex;
  3542. pxTCB_72->xStateListItem.pxNext = pxIndex_87;
  3543. _29 = pxIndex_87->pxPrevious;
  3544. pxTCB_72->xStateListItem.pxPrevious = _29;
  3545. _30 = pxIndex_87->pxPrevious;
  3546. _31 = &pxTCB_72->xStateListItem;
  3547. _30->pxNext = _31;
  3548. _32 = &pxTCB_72->xStateListItem;
  3549. pxIndex_87->pxPrevious = _32;
  3550. _33 = pxTCB_72->uxPriority;
  3551. _34 = &pxReadyTasksLists[_33];
  3552. pxTCB_72->xStateListItem.pvContainer = _34;
  3553. _35 = pxTCB_72->uxPriority;
  3554. _36 ={v} pxReadyTasksLists[_35].uxNumberOfItems;
  3555. _37 = _36 + 1;
  3556. pxReadyTasksLists[_35].uxNumberOfItems ={v} _37;
  3557. _38 = pxTCB_72->uxPriority;
  3558. pxCurrentTCB.49_39 ={v} pxCurrentTCB;
  3559. _40 = pxCurrentTCB.49_39->uxPriority;
  3560. if (_38 >= _40)
  3561. goto <bb 15>; [INV]
  3562. else
  3563. goto <bb 16>; [INV]
  3564. <bb 15> :
  3565. xYieldPending ={v} 1;
  3566. <bb 16> :
  3567. # pxTCB_45 = PHI <pxTCB_57(7), pxTCB_72(14), pxTCB_72(15)>
  3568. _41 ={v} xPendingReadyList.uxNumberOfItems;
  3569. if (_41 != 0)
  3570. goto <bb 8>; [INV]
  3571. else
  3572. goto <bb 17>; [INV]
  3573. <bb 17> :
  3574. if (pxTCB_45 != 0B)
  3575. goto <bb 18>; [INV]
  3576. else
  3577. goto <bb 19>; [INV]
  3578. <bb 18> :
  3579. prvResetNextTaskUnblockTime ();
  3580. <bb 19> :
  3581. xPendedCounts_63 ={v} xPendedTicks;
  3582. if (xPendedCounts_63 != 0)
  3583. goto <bb 20>; [INV]
  3584. else
  3585. goto <bb 24>; [INV]
  3586. <bb 20> :
  3587. # xPendedCounts_47 = PHI <xPendedCounts_63(19), xPendedCounts_66(22)>
  3588. _42 = xTaskIncrementTick ();
  3589. if (_42 != 0)
  3590. goto <bb 21>; [INV]
  3591. else
  3592. goto <bb 22>; [INV]
  3593. <bb 21> :
  3594. xYieldPending ={v} 1;
  3595. <bb 22> :
  3596. xPendedCounts_66 = xPendedCounts_47 + 4294967295;
  3597. if (xPendedCounts_66 != 0)
  3598. goto <bb 20>; [INV]
  3599. else
  3600. goto <bb 23>; [INV]
  3601. <bb 23> :
  3602. xPendedTicks ={v} 0;
  3603. <bb 24> :
  3604. xYieldPending.50_43 ={v} xYieldPending;
  3605. if (xYieldPending.50_43 != 0)
  3606. goto <bb 25>; [INV]
  3607. else
  3608. goto <bb 26>; [INV]
  3609. <bb 25> :
  3610. xAlreadyYielded_68 = 1;
  3611. _44 = 3758157060B;
  3612. *_44 ={v} 268435456;
  3613. __asm__ __volatile__("dsb" : : : "memory");
  3614. __asm__ __volatile__("isb");
  3615. <bb 26> :
  3616. # xAlreadyYielded_46 = PHI <xAlreadyYielded_58(5), xAlreadyYielded_58(24), xAlreadyYielded_58(6), xAlreadyYielded_68(25)>
  3617. vPortExitCritical ();
  3618. _96 = xAlreadyYielded_46;
  3619. <bb 27> :
  3620. <L33>:
  3621. return _96;
  3622. }
  3623. vTaskSuspendAll ()
  3624. {
  3625. long unsigned int uxSchedulerSuspended.43_1;
  3626. long unsigned int _2;
  3627. <bb 2> :
  3628. uxSchedulerSuspended.43_1 ={v} uxSchedulerSuspended;
  3629. _2 = uxSchedulerSuspended.43_1 + 1;
  3630. uxSchedulerSuspended ={v} _2;
  3631. __asm__ __volatile__("" : : : "memory");
  3632. return;
  3633. }
  3634. vTaskEndScheduler ()
  3635. {
  3636. <bb 2> :
  3637. vPortRaiseBASEPRI ();
  3638. xSchedulerRunning ={v} 0;
  3639. vPortEndScheduler ();
  3640. return;
  3641. }
  3642. vTaskStartScheduler ()
  3643. {
  3644. BaseType_t xReturn;
  3645. long unsigned int vol.42;
  3646. long int _1;
  3647. long unsigned int vol.42_16;
  3648. <bb 2> :
  3649. xReturn_7 = xTaskCreate (prvIdleTask, "IDLE", 90, 0B, 0, &xIdleTaskHandle);
  3650. if (xReturn_7 == 1)
  3651. goto <bb 3>; [INV]
  3652. else
  3653. goto <bb 4>; [INV]
  3654. <bb 3> :
  3655. xReturn_9 = xTimerCreateTimerTask ();
  3656. <bb 4> :
  3657. # xReturn_2 = PHI <xReturn_7(2), xReturn_9(3)>
  3658. if (xReturn_2 == 1)
  3659. goto <bb 5>; [INV]
  3660. else
  3661. goto <bb 6>; [INV]
  3662. <bb 5> :
  3663. vPortRaiseBASEPRI ();
  3664. xNextTaskUnblockTime ={v} 4294967295;
  3665. xSchedulerRunning ={v} 1;
  3666. xTickCount ={v} 0;
  3667. _1 = xPortStartScheduler ();
  3668. goto <bb 9>; [INV]
  3669. <bb 6> :
  3670. if (xReturn_2 == -1)
  3671. goto <bb 7>; [INV]
  3672. else
  3673. goto <bb 9>; [INV]
  3674. <bb 7> :
  3675. vPortRaiseBASEPRI ();
  3676. <bb 8> :
  3677. goto <bb 8>; [INV]
  3678. <bb 9> :
  3679. vol.42_16 ={v} uxTopUsedPriority;
  3680. return;
  3681. }
  3682. xTaskResumeFromISR (struct tskTaskControlBlock * xTaskToResume)
  3683. {
  3684. struct ListItem_t * const pxIndex;
  3685. UBaseType_t uxSavedInterruptStatus;
  3686. struct TCB_t * const pxTCB;
  3687. BaseType_t xYieldRequired;
  3688. BaseType_t D.7744;
  3689. long int _1;
  3690. long unsigned int uxSchedulerSuspended.39_2;
  3691. long unsigned int _3;
  3692. struct TCB_t * pxCurrentTCB.40_4;
  3693. long unsigned int _5;
  3694. struct ListItem_t * _6;
  3695. long unsigned int _7;
  3696. long unsigned int uxTopReadyPriority.41_8;
  3697. long unsigned int _9;
  3698. long unsigned int _10;
  3699. struct xLIST_ITEM * _11;
  3700. struct xLIST_ITEM * _12;
  3701. struct ListItem_t * _13;
  3702. struct ListItem_t * _14;
  3703. long unsigned int _15;
  3704. struct List_t * _16;
  3705. long unsigned int _17;
  3706. long unsigned int _18;
  3707. long unsigned int _19;
  3708. struct ListItem_t * _20;
  3709. BaseType_t _47;
  3710. <bb 2> :
  3711. xYieldRequired_26 = 0;
  3712. pxTCB_28 = xTaskToResume_27(D);
  3713. if (xTaskToResume_27(D) == 0B)
  3714. goto <bb 3>; [INV]
  3715. else
  3716. goto <bb 5>; [INV]
  3717. <bb 3> :
  3718. vPortRaiseBASEPRI ();
  3719. <bb 4> :
  3720. goto <bb 4>; [INV]
  3721. <bb 5> :
  3722. vPortValidateInterruptPriority ();
  3723. uxSavedInterruptStatus_32 = ulPortRaiseBASEPRI ();
  3724. _1 = prvTaskIsTaskSuspended (pxTCB_28);
  3725. if (_1 != 0)
  3726. goto <bb 6>; [INV]
  3727. else
  3728. goto <bb 13>; [INV]
  3729. <bb 6> :
  3730. uxSchedulerSuspended.39_2 ={v} uxSchedulerSuspended;
  3731. if (uxSchedulerSuspended.39_2 == 0)
  3732. goto <bb 7>; [INV]
  3733. else
  3734. goto <bb 12>; [INV]
  3735. <bb 7> :
  3736. _3 = pxTCB_28->uxPriority;
  3737. pxCurrentTCB.40_4 ={v} pxCurrentTCB;
  3738. _5 = pxCurrentTCB.40_4->uxPriority;
  3739. if (_3 >= _5)
  3740. goto <bb 8>; [INV]
  3741. else
  3742. goto <bb 9>; [INV]
  3743. <bb 8> :
  3744. xYieldRequired_35 = 1;
  3745. xYieldPending ={v} 1;
  3746. <bb 9> :
  3747. # xYieldRequired_21 = PHI <xYieldRequired_26(7), xYieldRequired_35(8)>
  3748. _6 = &pxTCB_28->xStateListItem;
  3749. uxListRemove (_6);
  3750. _7 = pxTCB_28->uxPriority;
  3751. uxTopReadyPriority.41_8 ={v} uxTopReadyPriority;
  3752. if (_7 > uxTopReadyPriority.41_8)
  3753. goto <bb 10>; [INV]
  3754. else
  3755. goto <bb 11>; [INV]
  3756. <bb 10> :
  3757. _9 = pxTCB_28->uxPriority;
  3758. uxTopReadyPriority ={v} _9;
  3759. <bb 11> :
  3760. _10 = pxTCB_28->uxPriority;
  3761. pxIndex_39 = pxReadyTasksLists[_10].pxIndex;
  3762. pxTCB_28->xStateListItem.pxNext = pxIndex_39;
  3763. _11 = pxIndex_39->pxPrevious;
  3764. pxTCB_28->xStateListItem.pxPrevious = _11;
  3765. _12 = pxIndex_39->pxPrevious;
  3766. _13 = &pxTCB_28->xStateListItem;
  3767. _12->pxNext = _13;
  3768. _14 = &pxTCB_28->xStateListItem;
  3769. pxIndex_39->pxPrevious = _14;
  3770. _15 = pxTCB_28->uxPriority;
  3771. _16 = &pxReadyTasksLists[_15];
  3772. pxTCB_28->xStateListItem.pvContainer = _16;
  3773. _17 = pxTCB_28->uxPriority;
  3774. _18 ={v} pxReadyTasksLists[_17].uxNumberOfItems;
  3775. _19 = _18 + 1;
  3776. pxReadyTasksLists[_17].uxNumberOfItems ={v} _19;
  3777. goto <bb 13>; [INV]
  3778. <bb 12> :
  3779. _20 = &pxTCB_28->xEventListItem;
  3780. vListInsertEnd (&xPendingReadyList, _20);
  3781. <bb 13> :
  3782. # xYieldRequired_22 = PHI <xYieldRequired_26(5), xYieldRequired_26(12), xYieldRequired_21(11)>
  3783. vPortSetBASEPRI (uxSavedInterruptStatus_32);
  3784. _47 = xYieldRequired_22;
  3785. <bb 14> :
  3786. <L14>:
  3787. return _47;
  3788. }
  3789. vTaskResume (struct tskTaskControlBlock * xTaskToResume)
  3790. {
  3791. struct ListItem_t * const pxIndex;
  3792. struct TCB_t * const pxTCB;
  3793. struct TCB_t * pxCurrentTCB.36_1;
  3794. long int _2;
  3795. struct ListItem_t * _3;
  3796. long unsigned int _4;
  3797. long unsigned int uxTopReadyPriority.37_5;
  3798. long unsigned int _6;
  3799. long unsigned int _7;
  3800. struct xLIST_ITEM * _8;
  3801. struct xLIST_ITEM * _9;
  3802. struct ListItem_t * _10;
  3803. struct ListItem_t * _11;
  3804. long unsigned int _12;
  3805. struct List_t * _13;
  3806. long unsigned int _14;
  3807. long unsigned int _15;
  3808. long unsigned int _16;
  3809. long unsigned int _17;
  3810. struct TCB_t * pxCurrentTCB.38_18;
  3811. long unsigned int _19;
  3812. volatile uint32_t * _20;
  3813. <bb 2> :
  3814. pxTCB_25 = xTaskToResume_24(D);
  3815. if (xTaskToResume_24(D) == 0B)
  3816. goto <bb 3>; [INV]
  3817. else
  3818. goto <bb 5>; [INV]
  3819. <bb 3> :
  3820. vPortRaiseBASEPRI ();
  3821. <bb 4> :
  3822. goto <bb 4>; [INV]
  3823. <bb 5> :
  3824. pxCurrentTCB.36_1 ={v} pxCurrentTCB;
  3825. if (pxTCB_25 != pxCurrentTCB.36_1)
  3826. goto <bb 6>; [INV]
  3827. else
  3828. goto <bb 13>; [INV]
  3829. <bb 6> :
  3830. if (pxTCB_25 != 0B)
  3831. goto <bb 7>; [INV]
  3832. else
  3833. goto <bb 13>; [INV]
  3834. <bb 7> :
  3835. vPortEnterCritical ();
  3836. _2 = prvTaskIsTaskSuspended (pxTCB_25);
  3837. if (_2 != 0)
  3838. goto <bb 8>; [INV]
  3839. else
  3840. goto <bb 12>; [INV]
  3841. <bb 8> :
  3842. _3 = &pxTCB_25->xStateListItem;
  3843. uxListRemove (_3);
  3844. _4 = pxTCB_25->uxPriority;
  3845. uxTopReadyPriority.37_5 ={v} uxTopReadyPriority;
  3846. if (_4 > uxTopReadyPriority.37_5)
  3847. goto <bb 9>; [INV]
  3848. else
  3849. goto <bb 10>; [INV]
  3850. <bb 9> :
  3851. _6 = pxTCB_25->uxPriority;
  3852. uxTopReadyPriority ={v} _6;
  3853. <bb 10> :
  3854. _7 = pxTCB_25->uxPriority;
  3855. pxIndex_31 = pxReadyTasksLists[_7].pxIndex;
  3856. pxTCB_25->xStateListItem.pxNext = pxIndex_31;
  3857. _8 = pxIndex_31->pxPrevious;
  3858. pxTCB_25->xStateListItem.pxPrevious = _8;
  3859. _9 = pxIndex_31->pxPrevious;
  3860. _10 = &pxTCB_25->xStateListItem;
  3861. _9->pxNext = _10;
  3862. _11 = &pxTCB_25->xStateListItem;
  3863. pxIndex_31->pxPrevious = _11;
  3864. _12 = pxTCB_25->uxPriority;
  3865. _13 = &pxReadyTasksLists[_12];
  3866. pxTCB_25->xStateListItem.pvContainer = _13;
  3867. _14 = pxTCB_25->uxPriority;
  3868. _15 ={v} pxReadyTasksLists[_14].uxNumberOfItems;
  3869. _16 = _15 + 1;
  3870. pxReadyTasksLists[_14].uxNumberOfItems ={v} _16;
  3871. _17 = pxTCB_25->uxPriority;
  3872. pxCurrentTCB.38_18 ={v} pxCurrentTCB;
  3873. _19 = pxCurrentTCB.38_18->uxPriority;
  3874. if (_17 >= _19)
  3875. goto <bb 11>; [INV]
  3876. else
  3877. goto <bb 12>; [INV]
  3878. <bb 11> :
  3879. _20 = 3758157060B;
  3880. *_20 ={v} 268435456;
  3881. __asm__ __volatile__("dsb" : : : "memory");
  3882. __asm__ __volatile__("isb");
  3883. <bb 12> :
  3884. vPortExitCritical ();
  3885. <bb 13> :
  3886. return;
  3887. }
  3888. prvTaskIsTaskSuspended (struct tskTaskControlBlock * const xTask)
  3889. {
  3890. const struct TCB_t * const pxTCB;
  3891. BaseType_t xReturn;
  3892. BaseType_t D.7714;
  3893. struct xLIST * _1;
  3894. struct xLIST * _2;
  3895. struct xLIST * _3;
  3896. BaseType_t _10;
  3897. <bb 2> :
  3898. xReturn_5 = 0;
  3899. pxTCB_7 = xTask_6(D);
  3900. if (xTask_6(D) == 0B)
  3901. goto <bb 3>; [INV]
  3902. else
  3903. goto <bb 5>; [INV]
  3904. <bb 3> :
  3905. vPortRaiseBASEPRI ();
  3906. <bb 4> :
  3907. goto <bb 4>; [INV]
  3908. <bb 5> :
  3909. _1 = pxTCB_7->xStateListItem.pvContainer;
  3910. if (_1 == &xSuspendedTaskList)
  3911. goto <bb 6>; [INV]
  3912. else
  3913. goto <bb 9>; [INV]
  3914. <bb 6> :
  3915. _2 = pxTCB_7->xEventListItem.pvContainer;
  3916. if (_2 != &xPendingReadyList)
  3917. goto <bb 7>; [INV]
  3918. else
  3919. goto <bb 9>; [INV]
  3920. <bb 7> :
  3921. _3 = pxTCB_7->xEventListItem.pvContainer;
  3922. if (_3 == 0B)
  3923. goto <bb 8>; [INV]
  3924. else
  3925. goto <bb 9>; [INV]
  3926. <bb 8> :
  3927. xReturn_9 = 1;
  3928. <bb 9> :
  3929. # xReturn_4 = PHI <xReturn_5(5), xReturn_9(8), xReturn_5(6), xReturn_5(7)>
  3930. _10 = xReturn_4;
  3931. <bb 10> :
  3932. <L12>:
  3933. return _10;
  3934. }
  3935. vTaskSuspend (struct tskTaskControlBlock * xTaskToSuspend)
  3936. {
  3937. BaseType_t x;
  3938. struct TCB_t * pxTCB;
  3939. struct TCB_t * iftmp.30;
  3940. struct ListItem_t * _1;
  3941. long unsigned int _2;
  3942. struct xLIST * _3;
  3943. struct ListItem_t * _4;
  3944. struct ListItem_t * _5;
  3945. unsigned char _6;
  3946. long int xSchedulerRunning.31_7;
  3947. struct TCB_t * pxCurrentTCB.32_8;
  3948. long int xSchedulerRunning.33_9;
  3949. long unsigned int uxSchedulerSuspended.34_10;
  3950. volatile uint32_t * _11;
  3951. long unsigned int _12;
  3952. long unsigned int uxCurrentNumberOfTasks.35_13;
  3953. struct TCB_t * iftmp.30_15;
  3954. struct TCB_t * iftmp.30_24;
  3955. struct TCB_t * iftmp.30_25;
  3956. <bb 2> :
  3957. vPortEnterCritical ();
  3958. if (xTaskToSuspend_23(D) == 0B)
  3959. goto <bb 3>; [INV]
  3960. else
  3961. goto <bb 4>; [INV]
  3962. <bb 3> :
  3963. iftmp.30_25 ={v} pxCurrentTCB;
  3964. goto <bb 5>; [INV]
  3965. <bb 4> :
  3966. iftmp.30_24 = xTaskToSuspend_23(D);
  3967. <bb 5> :
  3968. # iftmp.30_15 = PHI <iftmp.30_25(3), iftmp.30_24(4)>
  3969. pxTCB_26 = iftmp.30_15;
  3970. _1 = &pxTCB_26->xStateListItem;
  3971. _2 = uxListRemove (_1);
  3972. <bb 6> :
  3973. _3 = pxTCB_26->xEventListItem.pvContainer;
  3974. if (_3 != 0B)
  3975. goto <bb 7>; [INV]
  3976. else
  3977. goto <bb 8>; [INV]
  3978. <bb 7> :
  3979. _4 = &pxTCB_26->xEventListItem;
  3980. uxListRemove (_4);
  3981. <bb 8> :
  3982. _5 = &pxTCB_26->xStateListItem;
  3983. vListInsertEnd (&xSuspendedTaskList, _5);
  3984. x_30 = 0;
  3985. goto <bb 12>; [INV]
  3986. <bb 9> :
  3987. _6 ={v} pxTCB_26->ucNotifyState[x_14];
  3988. if (_6 == 1)
  3989. goto <bb 10>; [INV]
  3990. else
  3991. goto <bb 11>; [INV]
  3992. <bb 10> :
  3993. pxTCB_26->ucNotifyState[x_14] ={v} 0;
  3994. <bb 11> :
  3995. x_42 = x_14 + 1;
  3996. <bb 12> :
  3997. # x_14 = PHI <x_30(8), x_42(11)>
  3998. if (x_14 <= 0)
  3999. goto <bb 9>; [INV]
  4000. else
  4001. goto <bb 13>; [INV]
  4002. <bb 13> :
  4003. vPortExitCritical ();
  4004. xSchedulerRunning.31_7 ={v} xSchedulerRunning;
  4005. if (xSchedulerRunning.31_7 != 0)
  4006. goto <bb 14>; [INV]
  4007. else
  4008. goto <bb 15>; [INV]
  4009. <bb 14> :
  4010. vPortEnterCritical ();
  4011. prvResetNextTaskUnblockTime ();
  4012. vPortExitCritical ();
  4013. <bb 15> :
  4014. pxCurrentTCB.32_8 ={v} pxCurrentTCB;
  4015. if (pxTCB_26 == pxCurrentTCB.32_8)
  4016. goto <bb 16>; [INV]
  4017. else
  4018. goto <bb 24>; [INV]
  4019. <bb 16> :
  4020. xSchedulerRunning.33_9 ={v} xSchedulerRunning;
  4021. if (xSchedulerRunning.33_9 != 0)
  4022. goto <bb 17>; [INV]
  4023. else
  4024. goto <bb 21>; [INV]
  4025. <bb 17> :
  4026. uxSchedulerSuspended.34_10 ={v} uxSchedulerSuspended;
  4027. if (uxSchedulerSuspended.34_10 != 0)
  4028. goto <bb 18>; [INV]
  4029. else
  4030. goto <bb 20>; [INV]
  4031. <bb 18> :
  4032. vPortRaiseBASEPRI ();
  4033. <bb 19> :
  4034. goto <bb 19>; [INV]
  4035. <bb 20> :
  4036. _11 = 3758157060B;
  4037. *_11 ={v} 268435456;
  4038. __asm__ __volatile__("dsb" : : : "memory");
  4039. __asm__ __volatile__("isb");
  4040. goto <bb 24>; [INV]
  4041. <bb 21> :
  4042. _12 ={v} xSuspendedTaskList.uxNumberOfItems;
  4043. uxCurrentNumberOfTasks.35_13 ={v} uxCurrentNumberOfTasks;
  4044. if (_12 == uxCurrentNumberOfTasks.35_13)
  4045. goto <bb 22>; [INV]
  4046. else
  4047. goto <bb 23>; [INV]
  4048. <bb 22> :
  4049. pxCurrentTCB ={v} 0B;
  4050. goto <bb 24>; [INV]
  4051. <bb 23> :
  4052. vTaskSwitchContext ();
  4053. <bb 24> :
  4054. return;
  4055. }
  4056. vTaskPrioritySet (struct tskTaskControlBlock * xTask, UBaseType_t uxNewPriority)
  4057. {
  4058. struct ListItem_t * const pxIndex;
  4059. BaseType_t xYieldRequired;
  4060. UBaseType_t uxPriorityUsedOnEntry;
  4061. UBaseType_t uxCurrentBasePriority;
  4062. struct TCB_t * pxTCB;
  4063. struct TCB_t * iftmp.25;
  4064. struct TCB_t * pxCurrentTCB.26_1;
  4065. struct TCB_t * pxCurrentTCB.27_2;
  4066. long unsigned int _3;
  4067. struct TCB_t * pxCurrentTCB.28_4;
  4068. long unsigned int _5;
  4069. long unsigned int _6;
  4070. long unsigned int _7;
  4071. signed int _8;
  4072. long unsigned int _9;
  4073. struct xLIST * _10;
  4074. struct List_t * _11;
  4075. struct ListItem_t * _12;
  4076. long unsigned int _13;
  4077. long unsigned int _14;
  4078. long unsigned int uxTopReadyPriority.29_15;
  4079. long unsigned int _16;
  4080. long unsigned int _17;
  4081. struct xLIST_ITEM * _18;
  4082. struct xLIST_ITEM * _19;
  4083. struct ListItem_t * _20;
  4084. struct ListItem_t * _21;
  4085. long unsigned int _22;
  4086. struct List_t * _23;
  4087. long unsigned int _24;
  4088. long unsigned int _25;
  4089. long unsigned int _26;
  4090. volatile uint32_t * _27;
  4091. struct TCB_t * iftmp.25_30;
  4092. struct TCB_t * iftmp.25_42;
  4093. struct TCB_t * iftmp.25_43;
  4094. <bb 2> :
  4095. xYieldRequired_36 = 0;
  4096. if (uxNewPriority_37(D) > 4)
  4097. goto <bb 3>; [INV]
  4098. else
  4099. goto <bb 5>; [INV]
  4100. <bb 3> :
  4101. vPortRaiseBASEPRI ();
  4102. <bb 4> :
  4103. goto <bb 4>; [INV]
  4104. <bb 5> :
  4105. if (uxNewPriority_37(D) > 4)
  4106. goto <bb 6>; [INV]
  4107. else
  4108. goto <bb 7>; [INV]
  4109. <bb 6> :
  4110. uxNewPriority_38 = 4;
  4111. <bb 7> :
  4112. # uxNewPriority_28 = PHI <uxNewPriority_37(D)(5), uxNewPriority_38(6)>
  4113. vPortEnterCritical ();
  4114. if (xTask_41(D) == 0B)
  4115. goto <bb 8>; [INV]
  4116. else
  4117. goto <bb 9>; [INV]
  4118. <bb 8> :
  4119. iftmp.25_43 ={v} pxCurrentTCB;
  4120. goto <bb 10>; [INV]
  4121. <bb 9> :
  4122. iftmp.25_42 = xTask_41(D);
  4123. <bb 10> :
  4124. # iftmp.25_30 = PHI <iftmp.25_43(8), iftmp.25_42(9)>
  4125. pxTCB_44 = iftmp.25_30;
  4126. uxCurrentBasePriority_45 = pxTCB_44->uxBasePriority;
  4127. if (uxCurrentBasePriority_45 != uxNewPriority_28)
  4128. goto <bb 11>; [INV]
  4129. else
  4130. goto <bb 28>; [INV]
  4131. <bb 11> :
  4132. if (uxNewPriority_28 > uxCurrentBasePriority_45)
  4133. goto <bb 12>; [INV]
  4134. else
  4135. goto <bb 15>; [INV]
  4136. <bb 12> :
  4137. pxCurrentTCB.26_1 ={v} pxCurrentTCB;
  4138. if (pxTCB_44 != pxCurrentTCB.26_1)
  4139. goto <bb 13>; [INV]
  4140. else
  4141. goto <bb 17>; [INV]
  4142. <bb 13> :
  4143. pxCurrentTCB.27_2 ={v} pxCurrentTCB;
  4144. _3 = pxCurrentTCB.27_2->uxPriority;
  4145. if (uxNewPriority_28 >= _3)
  4146. goto <bb 14>; [INV]
  4147. else
  4148. goto <bb 17>; [INV]
  4149. <bb 14> :
  4150. xYieldRequired_47 = 1;
  4151. goto <bb 17>; [INV]
  4152. <bb 15> :
  4153. pxCurrentTCB.28_4 ={v} pxCurrentTCB;
  4154. if (pxTCB_44 == pxCurrentTCB.28_4)
  4155. goto <bb 16>; [INV]
  4156. else
  4157. goto <bb 17>; [INV]
  4158. <bb 16> :
  4159. xYieldRequired_46 = 1;
  4160. <bb 17> :
  4161. # xYieldRequired_29 = PHI <xYieldRequired_47(14), xYieldRequired_36(15), xYieldRequired_46(16), xYieldRequired_36(12), xYieldRequired_36(13)>
  4162. uxPriorityUsedOnEntry_48 = pxTCB_44->uxPriority;
  4163. _5 = pxTCB_44->uxBasePriority;
  4164. _6 = pxTCB_44->uxPriority;
  4165. if (_5 == _6)
  4166. goto <bb 18>; [INV]
  4167. else
  4168. goto <bb 19>; [INV]
  4169. <bb 18> :
  4170. pxTCB_44->uxPriority = uxNewPriority_28;
  4171. <bb 19> :
  4172. pxTCB_44->uxBasePriority = uxNewPriority_28;
  4173. _7 = pxTCB_44->xEventListItem.xItemValue;
  4174. _8 = (signed int) _7;
  4175. if (_8 >= 0)
  4176. goto <bb 20>; [INV]
  4177. else
  4178. goto <bb 21>; [INV]
  4179. <bb 20> :
  4180. _9 = 5 - uxNewPriority_28;
  4181. pxTCB_44->xEventListItem.xItemValue = _9;
  4182. <bb 21> :
  4183. _10 = pxTCB_44->xStateListItem.pvContainer;
  4184. _11 = &pxReadyTasksLists[uxPriorityUsedOnEntry_48];
  4185. if (_10 == _11)
  4186. goto <bb 22>; [INV]
  4187. else
  4188. goto <bb 26>; [INV]
  4189. <bb 22> :
  4190. _12 = &pxTCB_44->xStateListItem;
  4191. _13 = uxListRemove (_12);
  4192. <bb 23> :
  4193. _14 = pxTCB_44->uxPriority;
  4194. uxTopReadyPriority.29_15 ={v} uxTopReadyPriority;
  4195. if (_14 > uxTopReadyPriority.29_15)
  4196. goto <bb 24>; [INV]
  4197. else
  4198. goto <bb 25>; [INV]
  4199. <bb 24> :
  4200. _16 = pxTCB_44->uxPriority;
  4201. uxTopReadyPriority ={v} _16;
  4202. <bb 25> :
  4203. _17 = pxTCB_44->uxPriority;
  4204. pxIndex_54 = pxReadyTasksLists[_17].pxIndex;
  4205. pxTCB_44->xStateListItem.pxNext = pxIndex_54;
  4206. _18 = pxIndex_54->pxPrevious;
  4207. pxTCB_44->xStateListItem.pxPrevious = _18;
  4208. _19 = pxIndex_54->pxPrevious;
  4209. _20 = &pxTCB_44->xStateListItem;
  4210. _19->pxNext = _20;
  4211. _21 = &pxTCB_44->xStateListItem;
  4212. pxIndex_54->pxPrevious = _21;
  4213. _22 = pxTCB_44->uxPriority;
  4214. _23 = &pxReadyTasksLists[_22];
  4215. pxTCB_44->xStateListItem.pvContainer = _23;
  4216. _24 = pxTCB_44->uxPriority;
  4217. _25 ={v} pxReadyTasksLists[_24].uxNumberOfItems;
  4218. _26 = _25 + 1;
  4219. pxReadyTasksLists[_24].uxNumberOfItems ={v} _26;
  4220. <bb 26> :
  4221. if (xYieldRequired_29 != 0)
  4222. goto <bb 27>; [INV]
  4223. else
  4224. goto <bb 28>; [INV]
  4225. <bb 27> :
  4226. _27 = 3758157060B;
  4227. *_27 ={v} 268435456;
  4228. __asm__ __volatile__("dsb" : : : "memory");
  4229. __asm__ __volatile__("isb");
  4230. <bb 28> :
  4231. vPortExitCritical ();
  4232. return;
  4233. }
  4234. uxTaskPriorityGetFromISR (struct tskTaskControlBlock * const xTask)
  4235. {
  4236. UBaseType_t uxSavedInterruptState;
  4237. UBaseType_t uxReturn;
  4238. const struct TCB_t * pxTCB;
  4239. UBaseType_t D.7633;
  4240. const struct TCB_t * iftmp.24;
  4241. const struct TCB_t * iftmp.24_1;
  4242. const struct TCB_t * iftmp.24_7;
  4243. const struct TCB_t * iftmp.24_8;
  4244. UBaseType_t _12;
  4245. <bb 2> :
  4246. vPortValidateInterruptPriority ();
  4247. uxSavedInterruptState_5 = ulPortRaiseBASEPRI ();
  4248. if (xTask_6(D) == 0B)
  4249. goto <bb 3>; [INV]
  4250. else
  4251. goto <bb 4>; [INV]
  4252. <bb 3> :
  4253. iftmp.24_8 ={v} pxCurrentTCB;
  4254. goto <bb 5>; [INV]
  4255. <bb 4> :
  4256. iftmp.24_7 = xTask_6(D);
  4257. <bb 5> :
  4258. # iftmp.24_1 = PHI <iftmp.24_8(3), iftmp.24_7(4)>
  4259. pxTCB_9 = iftmp.24_1;
  4260. uxReturn_10 = pxTCB_9->uxPriority;
  4261. vPortSetBASEPRI (uxSavedInterruptState_5);
  4262. _12 = uxReturn_10;
  4263. <bb 6> :
  4264. <L3>:
  4265. return _12;
  4266. }
  4267. uxTaskPriorityGet (struct tskTaskControlBlock * const xTask)
  4268. {
  4269. UBaseType_t uxReturn;
  4270. const struct TCB_t * pxTCB;
  4271. UBaseType_t D.7627;
  4272. const struct TCB_t * iftmp.23;
  4273. const struct TCB_t * iftmp.23_1;
  4274. const struct TCB_t * iftmp.23_5;
  4275. const struct TCB_t * iftmp.23_6;
  4276. UBaseType_t _10;
  4277. <bb 2> :
  4278. vPortEnterCritical ();
  4279. if (xTask_4(D) == 0B)
  4280. goto <bb 3>; [INV]
  4281. else
  4282. goto <bb 4>; [INV]
  4283. <bb 3> :
  4284. iftmp.23_6 ={v} pxCurrentTCB;
  4285. goto <bb 5>; [INV]
  4286. <bb 4> :
  4287. iftmp.23_5 = xTask_4(D);
  4288. <bb 5> :
  4289. # iftmp.23_1 = PHI <iftmp.23_6(3), iftmp.23_5(4)>
  4290. pxTCB_7 = iftmp.23_1;
  4291. uxReturn_8 = pxTCB_7->uxPriority;
  4292. vPortExitCritical ();
  4293. _10 = uxReturn_8;
  4294. <bb 6> :
  4295. <L3>:
  4296. return _10;
  4297. }
  4298. eTaskGetState (struct tskTaskControlBlock * xTask)
  4299. {
  4300. BaseType_t x;
  4301. const struct TCB_t * const pxTCB;
  4302. const struct List_t * pxOverflowedDelayedList;
  4303. const struct List_t * pxDelayedList;
  4304. const struct List_t * pxStateList;
  4305. eTaskState eReturn;
  4306. eTaskState D.7621;
  4307. struct TCB_t * pxCurrentTCB.22_1;
  4308. struct xLIST * _2;
  4309. unsigned char _3;
  4310. eTaskState _25;
  4311. <bb 2> :
  4312. pxTCB_9 = xTask_8(D);
  4313. if (pxTCB_9 == 0B)
  4314. goto <bb 3>; [INV]
  4315. else
  4316. goto <bb 5>; [INV]
  4317. <bb 3> :
  4318. vPortRaiseBASEPRI ();
  4319. <bb 4> :
  4320. goto <bb 4>; [INV]
  4321. <bb 5> :
  4322. pxCurrentTCB.22_1 ={v} pxCurrentTCB;
  4323. if (pxTCB_9 == pxCurrentTCB.22_1)
  4324. goto <bb 6>; [INV]
  4325. else
  4326. goto <bb 7>; [INV]
  4327. <bb 6> :
  4328. eReturn_24 = 0;
  4329. goto <bb 23>; [INV]
  4330. <bb 7> :
  4331. vPortEnterCritical ();
  4332. pxStateList_12 = pxTCB_9->xStateListItem.pvContainer;
  4333. pxDelayedList_13 ={v} pxDelayedTaskList;
  4334. pxOverflowedDelayedList_14 ={v} pxOverflowDelayedTaskList;
  4335. vPortExitCritical ();
  4336. if (pxStateList_12 == pxDelayedList_13)
  4337. goto <bb 9>; [INV]
  4338. else
  4339. goto <bb 8>; [INV]
  4340. <bb 8> :
  4341. if (pxStateList_12 == pxOverflowedDelayedList_14)
  4342. goto <bb 9>; [INV]
  4343. else
  4344. goto <bb 10>; [INV]
  4345. <bb 9> :
  4346. eReturn_23 = 2;
  4347. goto <bb 23>; [INV]
  4348. <bb 10> :
  4349. if (pxStateList_12 == &xSuspendedTaskList)
  4350. goto <bb 11>; [INV]
  4351. else
  4352. goto <bb 19>; [INV]
  4353. <bb 11> :
  4354. _2 = pxTCB_9->xEventListItem.pvContainer;
  4355. if (_2 == 0B)
  4356. goto <bb 12>; [INV]
  4357. else
  4358. goto <bb 18>; [INV]
  4359. <bb 12> :
  4360. eReturn_19 = 3;
  4361. x_20 = 0;
  4362. goto <bb 16>; [INV]
  4363. <bb 13> :
  4364. _3 ={v} pxTCB_9->ucNotifyState[x_6];
  4365. if (_3 == 1)
  4366. goto <bb 14>; [INV]
  4367. else
  4368. goto <bb 15>; [INV]
  4369. <bb 14> :
  4370. eReturn_22 = 2;
  4371. goto <bb 17>; [INV]
  4372. <bb 15> :
  4373. x_21 = x_6 + 1;
  4374. <bb 16> :
  4375. # x_6 = PHI <x_20(12), x_21(15)>
  4376. if (x_6 <= 0)
  4377. goto <bb 13>; [INV]
  4378. else
  4379. goto <bb 17>; [INV]
  4380. <bb 17> :
  4381. # eReturn_4 = PHI <eReturn_22(14), eReturn_19(16)>
  4382. goto <bb 23>; [INV]
  4383. <bb 18> :
  4384. eReturn_18 = 2;
  4385. goto <bb 23>; [INV]
  4386. <bb 19> :
  4387. if (pxStateList_12 == &xTasksWaitingTermination)
  4388. goto <bb 21>; [INV]
  4389. else
  4390. goto <bb 20>; [INV]
  4391. <bb 20> :
  4392. if (pxStateList_12 == 0B)
  4393. goto <bb 21>; [INV]
  4394. else
  4395. goto <bb 22>; [INV]
  4396. <bb 21> :
  4397. eReturn_17 = 4;
  4398. goto <bb 23>; [INV]
  4399. <bb 22> :
  4400. eReturn_16 = 1;
  4401. <bb 23> :
  4402. # eReturn_5 = PHI <eReturn_24(6), eReturn_23(9), eReturn_18(18), eReturn_17(21), eReturn_16(22), eReturn_4(17)>
  4403. _25 = eReturn_5;
  4404. <bb 24> :
  4405. <L25>:
  4406. return _25;
  4407. }
  4408. vTaskDelay (const TickType_t xTicksToDelay)
  4409. {
  4410. BaseType_t xAlreadyYielded;
  4411. long unsigned int uxSchedulerSuspended.21_1;
  4412. volatile uint32_t * _2;
  4413. <bb 2> :
  4414. xAlreadyYielded_6 = 0;
  4415. if (xTicksToDelay_7(D) != 0)
  4416. goto <bb 3>; [INV]
  4417. else
  4418. goto <bb 7>; [INV]
  4419. <bb 3> :
  4420. uxSchedulerSuspended.21_1 ={v} uxSchedulerSuspended;
  4421. if (uxSchedulerSuspended.21_1 != 0)
  4422. goto <bb 4>; [INV]
  4423. else
  4424. goto <bb 6>; [INV]
  4425. <bb 4> :
  4426. vPortRaiseBASEPRI ();
  4427. <bb 5> :
  4428. goto <bb 5>; [INV]
  4429. <bb 6> :
  4430. vTaskSuspendAll ();
  4431. prvAddCurrentTaskToDelayedList (xTicksToDelay_7(D), 0);
  4432. xAlreadyYielded_12 = xTaskResumeAll ();
  4433. <bb 7> :
  4434. # xAlreadyYielded_3 = PHI <xAlreadyYielded_6(2), xAlreadyYielded_12(6)>
  4435. if (xAlreadyYielded_3 == 0)
  4436. goto <bb 8>; [INV]
  4437. else
  4438. goto <bb 9>; [INV]
  4439. <bb 8> :
  4440. _2 = 3758157060B;
  4441. *_2 ={v} 268435456;
  4442. __asm__ __volatile__("dsb" : : : "memory");
  4443. __asm__ __volatile__("isb");
  4444. <bb 9> :
  4445. return;
  4446. }
  4447. xTaskDelayUntil (TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement)
  4448. {
  4449. const TickType_t xConstTickCount;
  4450. BaseType_t xShouldDelay;
  4451. BaseType_t xAlreadyYielded;
  4452. TickType_t xTimeToWake;
  4453. BaseType_t D.7590;
  4454. long unsigned int uxSchedulerSuspended.20_1;
  4455. long unsigned int _2;
  4456. long unsigned int _3;
  4457. long unsigned int _4;
  4458. long unsigned int _5;
  4459. long unsigned int _6;
  4460. volatile uint32_t * _7;
  4461. BaseType_t _27;
  4462. <bb 2> :
  4463. xShouldDelay_11 = 0;
  4464. if (pxPreviousWakeTime_12(D) == 0B)
  4465. goto <bb 3>; [INV]
  4466. else
  4467. goto <bb 5>; [INV]
  4468. <bb 3> :
  4469. vPortRaiseBASEPRI ();
  4470. <bb 4> :
  4471. goto <bb 4>; [INV]
  4472. <bb 5> :
  4473. if (xTimeIncrement_13(D) == 0)
  4474. goto <bb 6>; [INV]
  4475. else
  4476. goto <bb 8>; [INV]
  4477. <bb 6> :
  4478. vPortRaiseBASEPRI ();
  4479. <bb 7> :
  4480. goto <bb 7>; [INV]
  4481. <bb 8> :
  4482. uxSchedulerSuspended.20_1 ={v} uxSchedulerSuspended;
  4483. if (uxSchedulerSuspended.20_1 != 0)
  4484. goto <bb 9>; [INV]
  4485. else
  4486. goto <bb 11>; [INV]
  4487. <bb 9> :
  4488. vPortRaiseBASEPRI ();
  4489. <bb 10> :
  4490. goto <bb 10>; [INV]
  4491. <bb 11> :
  4492. vTaskSuspendAll ();
  4493. xConstTickCount_16 ={v} xTickCount;
  4494. _2 = *pxPreviousWakeTime_12(D);
  4495. xTimeToWake_17 = xTimeIncrement_13(D) + _2;
  4496. _3 = *pxPreviousWakeTime_12(D);
  4497. if (xConstTickCount_16 < _3)
  4498. goto <bb 12>; [INV]
  4499. else
  4500. goto <bb 15>; [INV]
  4501. <bb 12> :
  4502. _4 = *pxPreviousWakeTime_12(D);
  4503. if (xTimeToWake_17 < _4)
  4504. goto <bb 13>; [INV]
  4505. else
  4506. goto <bb 18>; [INV]
  4507. <bb 13> :
  4508. if (xTimeToWake_17 > xConstTickCount_16)
  4509. goto <bb 14>; [INV]
  4510. else
  4511. goto <bb 18>; [INV]
  4512. <bb 14> :
  4513. xShouldDelay_19 = 1;
  4514. goto <bb 18>; [INV]
  4515. <bb 15> :
  4516. _5 = *pxPreviousWakeTime_12(D);
  4517. if (xTimeToWake_17 < _5)
  4518. goto <bb 17>; [INV]
  4519. else
  4520. goto <bb 16>; [INV]
  4521. <bb 16> :
  4522. if (xTimeToWake_17 > xConstTickCount_16)
  4523. goto <bb 17>; [INV]
  4524. else
  4525. goto <bb 18>; [INV]
  4526. <bb 17> :
  4527. xShouldDelay_18 = 1;
  4528. <bb 18> :
  4529. # xShouldDelay_8 = PHI <xShouldDelay_11(13), xShouldDelay_11(16), xShouldDelay_18(17), xShouldDelay_11(12), xShouldDelay_19(14)>
  4530. *pxPreviousWakeTime_12(D) = xTimeToWake_17;
  4531. if (xShouldDelay_8 != 0)
  4532. goto <bb 19>; [INV]
  4533. else
  4534. goto <bb 20>; [INV]
  4535. <bb 19> :
  4536. _6 = xTimeToWake_17 - xConstTickCount_16;
  4537. prvAddCurrentTaskToDelayedList (_6, 0);
  4538. <bb 20> :
  4539. xAlreadyYielded_23 = xTaskResumeAll ();
  4540. if (xAlreadyYielded_23 == 0)
  4541. goto <bb 21>; [INV]
  4542. else
  4543. goto <bb 22>; [INV]
  4544. <bb 21> :
  4545. _7 = 3758157060B;
  4546. *_7 ={v} 268435456;
  4547. __asm__ __volatile__("dsb" : : : "memory");
  4548. __asm__ __volatile__("isb");
  4549. <bb 22> :
  4550. _27 = xShouldDelay_8;
  4551. <bb 23> :
  4552. <L26>:
  4553. return _27;
  4554. }
  4555. vTaskDelete (struct tskTaskControlBlock * xTaskToDelete)
  4556. {
  4557. struct TCB_t * pxTCB;
  4558. struct TCB_t * iftmp.12;
  4559. struct ListItem_t * _1;
  4560. long unsigned int _2;
  4561. struct xLIST * _3;
  4562. struct ListItem_t * _4;
  4563. long unsigned int uxTaskNumber.13_5;
  4564. long unsigned int _6;
  4565. struct TCB_t * pxCurrentTCB.14_7;
  4566. struct ListItem_t * _8;
  4567. long unsigned int uxDeletedTasksWaitingCleanUp.15_9;
  4568. long unsigned int _10;
  4569. long unsigned int uxCurrentNumberOfTasks.16_11;
  4570. long unsigned int _12;
  4571. long int xSchedulerRunning.17_13;
  4572. struct TCB_t * pxCurrentTCB.18_14;
  4573. long unsigned int uxSchedulerSuspended.19_15;
  4574. volatile uint32_t * _16;
  4575. struct TCB_t * iftmp.12_17;
  4576. struct TCB_t * iftmp.12_24;
  4577. struct TCB_t * iftmp.12_25;
  4578. <bb 2> :
  4579. vPortEnterCritical ();
  4580. if (xTaskToDelete_23(D) == 0B)
  4581. goto <bb 3>; [INV]
  4582. else
  4583. goto <bb 4>; [INV]
  4584. <bb 3> :
  4585. iftmp.12_25 ={v} pxCurrentTCB;
  4586. goto <bb 5>; [INV]
  4587. <bb 4> :
  4588. iftmp.12_24 = xTaskToDelete_23(D);
  4589. <bb 5> :
  4590. # iftmp.12_17 = PHI <iftmp.12_25(3), iftmp.12_24(4)>
  4591. pxTCB_26 = iftmp.12_17;
  4592. _1 = &pxTCB_26->xStateListItem;
  4593. _2 = uxListRemove (_1);
  4594. <bb 6> :
  4595. _3 = pxTCB_26->xEventListItem.pvContainer;
  4596. if (_3 != 0B)
  4597. goto <bb 7>; [INV]
  4598. else
  4599. goto <bb 8>; [INV]
  4600. <bb 7> :
  4601. _4 = &pxTCB_26->xEventListItem;
  4602. uxListRemove (_4);
  4603. <bb 8> :
  4604. uxTaskNumber.13_5 = uxTaskNumber;
  4605. _6 = uxTaskNumber.13_5 + 1;
  4606. uxTaskNumber = _6;
  4607. pxCurrentTCB.14_7 ={v} pxCurrentTCB;
  4608. if (pxTCB_26 == pxCurrentTCB.14_7)
  4609. goto <bb 9>; [INV]
  4610. else
  4611. goto <bb 10>; [INV]
  4612. <bb 9> :
  4613. _8 = &pxTCB_26->xStateListItem;
  4614. vListInsertEnd (&xTasksWaitingTermination, _8);
  4615. uxDeletedTasksWaitingCleanUp.15_9 ={v} uxDeletedTasksWaitingCleanUp;
  4616. _10 = uxDeletedTasksWaitingCleanUp.15_9 + 1;
  4617. uxDeletedTasksWaitingCleanUp ={v} _10;
  4618. goto <bb 11>; [INV]
  4619. <bb 10> :
  4620. uxCurrentNumberOfTasks.16_11 ={v} uxCurrentNumberOfTasks;
  4621. _12 = uxCurrentNumberOfTasks.16_11 + 4294967295;
  4622. uxCurrentNumberOfTasks ={v} _12;
  4623. prvDeleteTCB (pxTCB_26);
  4624. prvResetNextTaskUnblockTime ();
  4625. <bb 11> :
  4626. vPortExitCritical ();
  4627. xSchedulerRunning.17_13 ={v} xSchedulerRunning;
  4628. if (xSchedulerRunning.17_13 != 0)
  4629. goto <bb 12>; [INV]
  4630. else
  4631. goto <bb 17>; [INV]
  4632. <bb 12> :
  4633. pxCurrentTCB.18_14 ={v} pxCurrentTCB;
  4634. if (pxTCB_26 == pxCurrentTCB.18_14)
  4635. goto <bb 13>; [INV]
  4636. else
  4637. goto <bb 17>; [INV]
  4638. <bb 13> :
  4639. uxSchedulerSuspended.19_15 ={v} uxSchedulerSuspended;
  4640. if (uxSchedulerSuspended.19_15 != 0)
  4641. goto <bb 14>; [INV]
  4642. else
  4643. goto <bb 16>; [INV]
  4644. <bb 14> :
  4645. vPortRaiseBASEPRI ();
  4646. <bb 15> :
  4647. goto <bb 15>; [INV]
  4648. <bb 16> :
  4649. _16 = 3758157060B;
  4650. *_16 ={v} 268435456;
  4651. __asm__ __volatile__("dsb" : : : "memory");
  4652. __asm__ __volatile__("isb");
  4653. <bb 17> :
  4654. return;
  4655. }
  4656. prvAddNewTaskToReadyList (struct TCB_t * pxNewTCB)
  4657. {
  4658. struct ListItem_t * const pxIndex;
  4659. long unsigned int uxCurrentNumberOfTasks.2_1;
  4660. long unsigned int _2;
  4661. struct TCB_t * pxCurrentTCB.3_3;
  4662. long unsigned int uxCurrentNumberOfTasks.4_4;
  4663. long int xSchedulerRunning.5_5;
  4664. struct TCB_t * pxCurrentTCB.6_6;
  4665. long unsigned int _7;
  4666. long unsigned int _8;
  4667. long unsigned int uxTaskNumber.7_9;
  4668. long unsigned int _10;
  4669. long unsigned int uxTaskNumber.8_11;
  4670. long unsigned int _12;
  4671. long unsigned int uxTopReadyPriority.9_13;
  4672. long unsigned int _14;
  4673. long unsigned int _15;
  4674. struct xLIST_ITEM * _16;
  4675. struct xLIST_ITEM * _17;
  4676. struct ListItem_t * _18;
  4677. struct ListItem_t * _19;
  4678. long unsigned int _20;
  4679. struct List_t * _21;
  4680. long unsigned int _22;
  4681. long unsigned int _23;
  4682. long unsigned int _24;
  4683. long int xSchedulerRunning.10_25;
  4684. struct TCB_t * pxCurrentTCB.11_26;
  4685. long unsigned int _27;
  4686. long unsigned int _28;
  4687. volatile uint32_t * _29;
  4688. <bb 2> :
  4689. vPortEnterCritical ();
  4690. uxCurrentNumberOfTasks.2_1 ={v} uxCurrentNumberOfTasks;
  4691. _2 = uxCurrentNumberOfTasks.2_1 + 1;
  4692. uxCurrentNumberOfTasks ={v} _2;
  4693. pxCurrentTCB.3_3 ={v} pxCurrentTCB;
  4694. if (pxCurrentTCB.3_3 == 0B)
  4695. goto <bb 3>; [INV]
  4696. else
  4697. goto <bb 5>; [INV]
  4698. <bb 3> :
  4699. pxCurrentTCB ={v} pxNewTCB_36(D);
  4700. uxCurrentNumberOfTasks.4_4 ={v} uxCurrentNumberOfTasks;
  4701. if (uxCurrentNumberOfTasks.4_4 == 1)
  4702. goto <bb 4>; [INV]
  4703. else
  4704. goto <bb 8>; [INV]
  4705. <bb 4> :
  4706. prvInitialiseTaskLists ();
  4707. goto <bb 8>; [INV]
  4708. <bb 5> :
  4709. xSchedulerRunning.5_5 ={v} xSchedulerRunning;
  4710. if (xSchedulerRunning.5_5 == 0)
  4711. goto <bb 6>; [INV]
  4712. else
  4713. goto <bb 8>; [INV]
  4714. <bb 6> :
  4715. pxCurrentTCB.6_6 ={v} pxCurrentTCB;
  4716. _7 = pxCurrentTCB.6_6->uxPriority;
  4717. _8 = pxNewTCB_36(D)->uxPriority;
  4718. if (_7 <= _8)
  4719. goto <bb 7>; [INV]
  4720. else
  4721. goto <bb 8>; [INV]
  4722. <bb 7> :
  4723. pxCurrentTCB ={v} pxNewTCB_36(D);
  4724. <bb 8> :
  4725. uxTaskNumber.7_9 = uxTaskNumber;
  4726. _10 = uxTaskNumber.7_9 + 1;
  4727. uxTaskNumber = _10;
  4728. uxTaskNumber.8_11 = uxTaskNumber;
  4729. pxNewTCB_36(D)->uxTCBNumber = uxTaskNumber.8_11;
  4730. _12 = pxNewTCB_36(D)->uxPriority;
  4731. uxTopReadyPriority.9_13 ={v} uxTopReadyPriority;
  4732. if (_12 > uxTopReadyPriority.9_13)
  4733. goto <bb 9>; [INV]
  4734. else
  4735. goto <bb 10>; [INV]
  4736. <bb 9> :
  4737. _14 = pxNewTCB_36(D)->uxPriority;
  4738. uxTopReadyPriority ={v} _14;
  4739. <bb 10> :
  4740. _15 = pxNewTCB_36(D)->uxPriority;
  4741. pxIndex_43 = pxReadyTasksLists[_15].pxIndex;
  4742. pxNewTCB_36(D)->xStateListItem.pxNext = pxIndex_43;
  4743. _16 = pxIndex_43->pxPrevious;
  4744. pxNewTCB_36(D)->xStateListItem.pxPrevious = _16;
  4745. _17 = pxIndex_43->pxPrevious;
  4746. _18 = &pxNewTCB_36(D)->xStateListItem;
  4747. _17->pxNext = _18;
  4748. _19 = &pxNewTCB_36(D)->xStateListItem;
  4749. pxIndex_43->pxPrevious = _19;
  4750. _20 = pxNewTCB_36(D)->uxPriority;
  4751. _21 = &pxReadyTasksLists[_20];
  4752. pxNewTCB_36(D)->xStateListItem.pvContainer = _21;
  4753. _22 = pxNewTCB_36(D)->uxPriority;
  4754. _23 ={v} pxReadyTasksLists[_22].uxNumberOfItems;
  4755. _24 = _23 + 1;
  4756. pxReadyTasksLists[_22].uxNumberOfItems ={v} _24;
  4757. vPortExitCritical ();
  4758. xSchedulerRunning.10_25 ={v} xSchedulerRunning;
  4759. if (xSchedulerRunning.10_25 != 0)
  4760. goto <bb 11>; [INV]
  4761. else
  4762. goto <bb 13>; [INV]
  4763. <bb 11> :
  4764. pxCurrentTCB.11_26 ={v} pxCurrentTCB;
  4765. _27 = pxCurrentTCB.11_26->uxPriority;
  4766. _28 = pxNewTCB_36(D)->uxPriority;
  4767. if (_27 < _28)
  4768. goto <bb 12>; [INV]
  4769. else
  4770. goto <bb 13>; [INV]
  4771. <bb 12> :
  4772. _29 = 3758157060B;
  4773. *_29 ={v} 268435456;
  4774. __asm__ __volatile__("dsb" : : : "memory");
  4775. __asm__ __volatile__("isb");
  4776. <bb 13> :
  4777. return;
  4778. }
  4779. 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)
  4780. {
  4781. UBaseType_t x;
  4782. StackType_t * pxTopOfStack;
  4783. StackType_t * _1;
  4784. unsigned int _2;
  4785. StackType_t * _3;
  4786. sizetype _4;
  4787. sizetype _5;
  4788. long unsigned int pxTopOfStack.0_6;
  4789. long unsigned int _7;
  4790. long unsigned int pxTopOfStack.1_8;
  4791. long unsigned int _9;
  4792. const char * _10;
  4793. char _11;
  4794. const char * _12;
  4795. char _13;
  4796. struct ListItem_t * _14;
  4797. struct ListItem_t * _15;
  4798. long unsigned int _16;
  4799. volatile uint32_t * _17;
  4800. volatile uint8_t * _18;
  4801. StackType_t * _19;
  4802. <bb 2> :
  4803. _1 = pxNewTCB_27(D)->pxStack;
  4804. _2 = ulStackDepth_28(D) * 4;
  4805. memset (_1, 165, _2);
  4806. _3 = pxNewTCB_27(D)->pxStack;
  4807. _4 = ulStackDepth_28(D) + 1073741823;
  4808. _5 = _4 * 4;
  4809. pxTopOfStack_30 = _3 + _5;
  4810. pxTopOfStack.0_6 = (long unsigned int) pxTopOfStack_30;
  4811. _7 = pxTopOfStack.0_6 & 4294967288;
  4812. pxTopOfStack_31 = (StackType_t *) _7;
  4813. pxTopOfStack.1_8 = (long unsigned int) pxTopOfStack_31;
  4814. _9 = pxTopOfStack.1_8 & 7;
  4815. if (_9 != 0)
  4816. goto <bb 3>; [INV]
  4817. else
  4818. goto <bb 5>; [INV]
  4819. <bb 3> :
  4820. vPortRaiseBASEPRI ();
  4821. <bb 4> :
  4822. goto <bb 4>; [INV]
  4823. <bb 5> :
  4824. pxNewTCB_27(D)->pxEndOfStack = pxTopOfStack_31;
  4825. if (pcName_33(D) != 0B)
  4826. goto <bb 6>; [INV]
  4827. else
  4828. goto <bb 12>; [INV]
  4829. <bb 6> :
  4830. x_35 = 0;
  4831. goto <bb 10>; [INV]
  4832. <bb 7> :
  4833. _10 = pcName_33(D) + x_21;
  4834. _11 = *_10;
  4835. pxNewTCB_27(D)->pcTaskName[x_21] = _11;
  4836. _12 = pcName_33(D) + x_21;
  4837. _13 = *_12;
  4838. if (_13 == 0)
  4839. goto <bb 8>; [INV]
  4840. else
  4841. goto <bb 9>; [INV]
  4842. <bb 8> :
  4843. goto <bb 11>; [INV]
  4844. <bb 9> :
  4845. x_37 = x_21 + 1;
  4846. <bb 10> :
  4847. # x_21 = PHI <x_35(6), x_37(9)>
  4848. if (x_21 <= 9)
  4849. goto <bb 7>; [INV]
  4850. else
  4851. goto <bb 11>; [INV]
  4852. <bb 11> :
  4853. pxNewTCB_27(D)->pcTaskName[9] = 0;
  4854. goto <bb 13>; [INV]
  4855. <bb 12> :
  4856. pxNewTCB_27(D)->pcTaskName[0] = 0;
  4857. <bb 13> :
  4858. if (uxPriority_39(D) > 4)
  4859. goto <bb 14>; [INV]
  4860. else
  4861. goto <bb 16>; [INV]
  4862. <bb 14> :
  4863. vPortRaiseBASEPRI ();
  4864. <bb 15> :
  4865. goto <bb 15>; [INV]
  4866. <bb 16> :
  4867. if (uxPriority_39(D) > 4)
  4868. goto <bb 17>; [INV]
  4869. else
  4870. goto <bb 18>; [INV]
  4871. <bb 17> :
  4872. uxPriority_40 = 4;
  4873. <bb 18> :
  4874. # uxPriority_20 = PHI <uxPriority_39(D)(16), uxPriority_40(17)>
  4875. pxNewTCB_27(D)->uxPriority = uxPriority_20;
  4876. pxNewTCB_27(D)->uxBasePriority = uxPriority_20;
  4877. pxNewTCB_27(D)->uxMutexesHeld = 0;
  4878. _14 = &pxNewTCB_27(D)->xStateListItem;
  4879. vListInitialiseItem (_14);
  4880. _15 = &pxNewTCB_27(D)->xEventListItem;
  4881. vListInitialiseItem (_15);
  4882. pxNewTCB_27(D)->xStateListItem.pvOwner = pxNewTCB_27(D);
  4883. _16 = 5 - uxPriority_20;
  4884. pxNewTCB_27(D)->xEventListItem.xItemValue = _16;
  4885. pxNewTCB_27(D)->xEventListItem.pvOwner = pxNewTCB_27(D);
  4886. _17 = &pxNewTCB_27(D)->ulNotifiedValue[0];
  4887. memset (_17, 0, 4);
  4888. _18 = &pxNewTCB_27(D)->ucNotifyState[0];
  4889. memset (_18, 0, 1);
  4890. pxNewTCB_27(D)->ucDelayAborted = 0;
  4891. _19 = pxPortInitialiseStack (pxTopOfStack_31, pxTaskCode_52(D), pvParameters_53(D));
  4892. pxNewTCB_27(D)->pxTopOfStack = _19;
  4893. if (pxCreatedTask_56(D) != 0B)
  4894. goto <bb 19>; [INV]
  4895. else
  4896. goto <bb 20>; [INV]
  4897. <bb 19> :
  4898. *pxCreatedTask_56(D) = pxNewTCB_27(D);
  4899. <bb 20> :
  4900. return;
  4901. }
  4902. xTaskCreate (void (*TaskFunction_t) (void *) pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, struct tskTaskControlBlock * * const pxCreatedTask)
  4903. {
  4904. StackType_t * pxStack;
  4905. BaseType_t xReturn;
  4906. struct TCB_t * pxNewTCB;
  4907. BaseType_t D.7510;
  4908. unsigned int _1;
  4909. unsigned int _2;
  4910. long unsigned int _3;
  4911. BaseType_t _26;
  4912. <bb 2> :
  4913. _1 = (unsigned int) usStackDepth_8(D);
  4914. _2 = _1 * 4;
  4915. pxStack_11 = pvPortMalloc (_2);
  4916. if (pxStack_11 != 0B)
  4917. goto <bb 3>; [INV]
  4918. else
  4919. goto <bb 6>; [INV]
  4920. <bb 3> :
  4921. pxNewTCB_14 = pvPortMalloc (92);
  4922. if (pxNewTCB_14 != 0B)
  4923. goto <bb 4>; [INV]
  4924. else
  4925. goto <bb 5>; [INV]
  4926. <bb 4> :
  4927. pxNewTCB_14->pxStack = pxStack_11;
  4928. goto <bb 7>; [INV]
  4929. <bb 5> :
  4930. vPortFree (pxStack_11);
  4931. goto <bb 7>; [INV]
  4932. <bb 6> :
  4933. pxNewTCB_12 = 0B;
  4934. <bb 7> :
  4935. # pxNewTCB_4 = PHI <pxNewTCB_14(5), pxNewTCB_12(6), pxNewTCB_14(4)>
  4936. if (pxNewTCB_4 != 0B)
  4937. goto <bb 8>; [INV]
  4938. else
  4939. goto <bb 9>; [INV]
  4940. <bb 8> :
  4941. _3 = (long unsigned int) usStackDepth_8(D);
  4942. prvInitialiseNewTask (pxTaskCode_18(D), pcName_19(D), _3, pvParameters_20(D), uxPriority_21(D), pxCreatedTask_22(D), pxNewTCB_4, 0B);
  4943. prvAddNewTaskToReadyList (pxNewTCB_4);
  4944. xReturn_25 = 1;
  4945. goto <bb 10>; [INV]
  4946. <bb 9> :
  4947. xReturn_17 = -1;
  4948. <bb 10> :
  4949. # xReturn_5 = PHI <xReturn_25(8), xReturn_17(9)>
  4950. _26 = xReturn_5;
  4951. <bb 11> :
  4952. <L9>:
  4953. return _26;
  4954. }
  4955. __attribute__((always_inline))
  4956. vPortSetBASEPRI (uint32_t ulNewMaskValue)
  4957. {
  4958. <bb 2> :
  4959. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_2(D) : "memory");
  4960. return;
  4961. }
  4962. __attribute__((always_inline))
  4963. ulPortRaiseBASEPRI ()
  4964. {
  4965. uint32_t ulNewBASEPRI;
  4966. uint32_t ulOriginalBASEPRI;
  4967. uint32_t D.7635;
  4968. uint32_t _5;
  4969. <bb 2> :
  4970. __asm__ __volatile__(" mrs %0, basepri
  4971. mov %1, %2
  4972. msr basepri, %1
  4973. isb
  4974. dsb
  4975. " : "=r" ulOriginalBASEPRI_3, "=r" ulNewBASEPRI_4 : "i" 16 : "memory");
  4976. _5 = ulOriginalBASEPRI_3;
  4977. <bb 3> :
  4978. <L0>:
  4979. return _5;
  4980. }
  4981. __attribute__((always_inline))
  4982. vPortRaiseBASEPRI ()
  4983. {
  4984. uint32_t ulNewBASEPRI;
  4985. <bb 2> :
  4986. __asm__ __volatile__(" mov %0, %1
  4987. msr basepri, %0
  4988. isb
  4989. dsb
  4990. " : "=r" ulNewBASEPRI_3 : "i" 16 : "memory");
  4991. return;
  4992. }