tasks.c.064i.free-fnsummary1 141 KB

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