123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322 |
- Marking local functions:
- Marking externally visible functions: ucStreamBufferGetStreamBufferType vStreamBufferSetStreamBufferNumber uxStreamBufferGetStreamBufferNumber xStreamBufferReceiveCompletedFromISR xStreamBufferSendCompletedFromISR xStreamBufferIsFull xStreamBufferIsEmpty xStreamBufferReceiveFromISR xStreamBufferNextMessageLengthBytes xStreamBufferReceive xStreamBufferSendFromISR xStreamBufferSend xStreamBufferBytesAvailable xStreamBufferSpacesAvailable xStreamBufferSetTriggerLevel xStreamBufferReset vStreamBufferDelete xStreamBufferGenericCreate
- Marking externally visible variables:
- Reclaiming functions:
- Reclaiming variables:
- Clearing address taken flags:
- Symbol table:
- memcpy/42 (memcpy) @06cfba80
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: prvReadBytesFromBuffer/22 prvReadBytesFromBuffer/22 prvWriteBytesToBuffer/21 prvWriteBytesToBuffer/21
- Calls:
- xTaskGenericNotifyFromISR/41 (xTaskGenericNotifyFromISR) @06ccad20
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceiveFromISR/15 xStreamBufferSendFromISR/11 xStreamBufferReceiveCompletedFromISR/20 xStreamBufferSendCompletedFromISR/19
- Calls:
- xTaskResumeAll/40 (xTaskResumeAll) @06ccab60
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- xTaskGenericNotify/39 (xTaskGenericNotify) @06ccaa80
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- vTaskSuspendAll/38 (vTaskSuspendAll) @06cca9a0
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- xTaskCheckForTimeOut/37 (xTaskCheckForTimeOut) @06cca8c0
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferSend/10
- Calls:
- xTaskGenericNotifyWait/36 (xTaskGenericNotifyWait) @06cca7e0
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- xTaskGetCurrentTaskHandle/35 (xTaskGetCurrentTaskHandle) @06cca700
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- xTaskGenericNotifyStateClear/34 (xTaskGenericNotifyStateClear) @06cca620
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- vTaskSetTimeOutState/33 (vTaskSetTimeOutState) @06cca540
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferSend/10
- Calls:
- vPortExitCritical/32 (vPortExitCritical) @06cc3380
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReset/6 xStreamBufferReceive/13 xStreamBufferSend/10 xStreamBufferSend/10
- Calls:
- vPortEnterCritical/31 (vPortEnterCritical) @06cc30e0
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferReset/6 xStreamBufferReceive/13 xStreamBufferSend/10
- Calls:
- memset/30 (memset) @06cc3e00
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: prvInitialiseNewStreamBuffer/24 prvInitialiseNewStreamBuffer/24 vStreamBufferDelete/5
- Calls:
- vPortFree/29 (vPortFree) @06cc3d20
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: vStreamBufferDelete/5
- Calls:
- pvPortMalloc/28 (pvPortMalloc) @06cc3a80
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags:
- Called by: xStreamBufferGenericCreate/4
- Calls:
- ucStreamBufferGetStreamBufferType/27 (ucStreamBufferGetStreamBufferType) @06cc3540
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls:
- vStreamBufferSetStreamBufferNumber/26 (vStreamBufferSetStreamBufferNumber) @06cc32a0
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls:
- uxStreamBufferGetStreamBufferNumber/25 (uxStreamBufferGetStreamBufferNumber) @06cc3000
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls:
- prvInitialiseNewStreamBuffer/24 (prvInitialiseNewStreamBuffer) @06cb8a80
- Type: function definition analyzed
- Visibility: force_output no_reorder prevailing_def_ironly
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: xStreamBufferReset/6 xStreamBufferGenericCreate/4
- Calls: memset/30 memset/30
- prvBytesInBuffer/23 (prvBytesInBuffer) @06cb8380
- Type: function definition analyzed
- Visibility: force_output no_reorder prevailing_def_ironly
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: xStreamBufferReceiveFromISR/15 xStreamBufferNextMessageLengthBytes/14 xStreamBufferReceive/13 xStreamBufferReceive/13 xStreamBufferReceive/13 xStreamBufferSendFromISR/11 xStreamBufferSend/10 xStreamBufferBytesAvailable/9
- Calls:
- prvReadBytesFromBuffer/22 (prvReadBytesFromBuffer) @06cb8e00
- Type: function definition analyzed
- Visibility: force_output no_reorder prevailing_def_ironly
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: xStreamBufferNextMessageLengthBytes/14 prvReadMessageFromBuffer/16 prvReadMessageFromBuffer/16
- Calls: memcpy/42 memcpy/42
- prvWriteBytesToBuffer/21 (prvWriteBytesToBuffer) @06cb89a0
- Type: function definition analyzed
- Visibility: force_output no_reorder prevailing_def_ironly
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: prvWriteMessageToBuffer/12 prvWriteMessageToBuffer/12
- Calls: memcpy/42 memcpy/42
- xStreamBufferReceiveCompletedFromISR/20 (xStreamBufferReceiveCompletedFromISR) @06cb8620
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xTaskGenericNotifyFromISR/41
- xStreamBufferSendCompletedFromISR/19 (xStreamBufferSendCompletedFromISR) @06cb82a0
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xTaskGenericNotifyFromISR/41
- xStreamBufferIsFull/18 (xStreamBufferIsFull) @06cb0d20
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xStreamBufferSpacesAvailable/8
- xStreamBufferIsEmpty/17 (xStreamBufferIsEmpty) @06cb00e0
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls:
- prvReadMessageFromBuffer/16 (prvReadMessageFromBuffer) @06cb0c40
- Type: function definition analyzed
- Visibility: force_output no_reorder prevailing_def_ironly
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: xStreamBufferReceiveFromISR/15 xStreamBufferReceive/13
- Calls: prvReadBytesFromBuffer/22 prvReadBytesFromBuffer/22
- xStreamBufferReceiveFromISR/15 (xStreamBufferReceiveFromISR) @06cb08c0
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xTaskGenericNotifyFromISR/41 prvReadMessageFromBuffer/16 prvBytesInBuffer/23
- xStreamBufferNextMessageLengthBytes/14 (xStreamBufferNextMessageLengthBytes) @06cb0460
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: prvReadBytesFromBuffer/22 prvBytesInBuffer/23
- xStreamBufferReceive/13 (xStreamBufferReceive) @06cb0000
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xTaskResumeAll/40 xTaskGenericNotify/39 vTaskSuspendAll/38 prvReadMessageFromBuffer/16 prvBytesInBuffer/23 prvBytesInBuffer/23 xTaskGenericNotifyWait/36 vPortExitCritical/32 xTaskGetCurrentTaskHandle/35 xTaskGenericNotifyStateClear/34 prvBytesInBuffer/23 vPortEnterCritical/31
- prvWriteMessageToBuffer/12 (prvWriteMessageToBuffer) @06c64e00
- Type: function definition analyzed
- Visibility: force_output no_reorder prevailing_def_ironly
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: xStreamBufferSendFromISR/11 xStreamBufferSend/10
- Calls: prvWriteBytesToBuffer/21 prvWriteBytesToBuffer/21
- xStreamBufferSendFromISR/11 (xStreamBufferSendFromISR) @06c64a80
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xTaskGenericNotifyFromISR/41 prvBytesInBuffer/23 prvWriteMessageToBuffer/12 xStreamBufferSpacesAvailable/8
- xStreamBufferSend/10 (xStreamBufferSend) @06c64620
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: xTaskResumeAll/40 xTaskGenericNotify/39 vTaskSuspendAll/38 prvBytesInBuffer/23 prvWriteMessageToBuffer/12 xStreamBufferSpacesAvailable/8 xTaskCheckForTimeOut/37 xTaskGenericNotifyWait/36 vPortExitCritical/32 vPortExitCritical/32 xTaskGetCurrentTaskHandle/35 xTaskGenericNotifyStateClear/34 xStreamBufferSpacesAvailable/8 vPortEnterCritical/31 vTaskSetTimeOutState/33
- xStreamBufferBytesAvailable/9 (xStreamBufferBytesAvailable) @06c64000
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: prvBytesInBuffer/23
- xStreamBufferSpacesAvailable/8 (xStreamBufferSpacesAvailable) @06c5a7e0
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by: xStreamBufferSendFromISR/11 xStreamBufferSend/10 xStreamBufferSend/10 xStreamBufferIsFull/18
- Calls:
- xStreamBufferSetTriggerLevel/7 (xStreamBufferSetTriggerLevel) @06c5ae00
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls:
- xStreamBufferReset/6 (xStreamBufferReset) @06c5aa80
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: vPortExitCritical/32 prvInitialiseNewStreamBuffer/24 vPortEnterCritical/31
- vStreamBufferDelete/5 (vStreamBufferDelete) @06c5a700
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: memset/30 vPortFree/29
- xStreamBufferGenericCreate/4 (xStreamBufferGenericCreate) @06c5a380
- Type: function definition analyzed
- Visibility: force_output externally_visible no_reorder public
- References:
- Referring:
- Availability: available
- Function flags: body
- Called by:
- Calls: prvInitialiseNewStreamBuffer/24 pvPortMalloc/28
- ucStreamBufferGetStreamBufferType (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint8_t D.6587;
- unsigned char _1;
- uint8_t _4;
- <bb 2> :
- _1 = xStreamBuffer_3(D)->ucFlags;
- _4 = _1 & 1;
- <bb 3> :
- <L0>:
- return _4;
- }
- vStreamBufferSetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer, UBaseType_t uxStreamBufferNumber)
- {
- <bb 2> :
- xStreamBuffer_2(D)->uxStreamBufferNumber = uxStreamBufferNumber_3(D);
- return;
- }
- uxStreamBufferGetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer)
- {
- UBaseType_t D.6585;
- UBaseType_t _3;
- <bb 2> :
- _3 = xStreamBuffer_2(D)->uxStreamBufferNumber;
- <bb 3> :
- <L0>:
- return _3;
- }
- prvInitialiseNewStreamBuffer (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
- {
- uint32_t ulNewBASEPRI;
- const BaseType_t xWriteValue;
- void * _1;
- <bb 2> :
- xWriteValue_2 = 85;
- _1 = memset (pucBuffer_4(D), xWriteValue_2, xBufferSizeBytes_5(D));
- if (pucBuffer_4(D) != _1)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- memset (pxStreamBuffer_7(D), 0, 36);
- pxStreamBuffer_7(D)->pucBuffer = pucBuffer_4(D);
- pxStreamBuffer_7(D)->xLength = xBufferSizeBytes_5(D);
- pxStreamBuffer_7(D)->xTriggerLevelBytes = xTriggerLevelBytes_11(D);
- pxStreamBuffer_7(D)->ucFlags = ucFlags_13(D);
- return;
- }
- prvBytesInBuffer (const struct StreamBuffer_t * const pxStreamBuffer)
- {
- size_t xCount;
- size_t D.6581;
- unsigned int D.6577;
- unsigned int _1;
- unsigned int _2;
- unsigned int _3;
- unsigned int _4;
- unsigned int _9;
- size_t _12;
- <bb 2> :
- _1 = pxStreamBuffer_7(D)->xLength;
- _2 ={v} pxStreamBuffer_7(D)->xHead;
- xCount_8 = _1 + _2;
- _9 ={v} pxStreamBuffer_7(D)->xTail;
- xCount_10 = xCount_8 - _9;
- _3 = pxStreamBuffer_7(D)->xLength;
- if (xCount_10 >= _3)
- goto <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- _4 = pxStreamBuffer_7(D)->xLength;
- xCount_11 = xCount_10 - _4;
- <bb 4> :
- # xCount_5 = PHI <xCount_10(2), xCount_11(3)>
- _12 = xCount_5;
- <bb 5> :
- <L3>:
- return _12;
- }
- prvReadBytesFromBuffer (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
- {
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- size_t xFirstLength;
- size_t D.6575;
- unsigned int _1;
- unsigned int _2;
- unsigned int _3;
- unsigned int _4;
- uint8_t * _5;
- uint8_t * _6;
- uint8_t * _7;
- uint8_t * _8;
- unsigned int _9;
- unsigned int _10;
- unsigned int _11;
- size_t _24;
- <bb 2> :
- if (xCount_14(D) == 0)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_25 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- _1 = pxStreamBuffer_16(D)->xLength;
- _2 = _1 - xTail_17(D);
- xFirstLength_18 = MIN_EXPR <xCount_14(D), _2>;
- if (xFirstLength_18 > xCount_14(D))
- goto <bb 7>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 7> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_26 : "i" 16 : "memory");
- <bb 8> :
- <bb 9> :
- goto <bb 9>; [INV]
- <bb 10> :
- _3 = xTail_17(D) + xFirstLength_18;
- _4 = pxStreamBuffer_16(D)->xLength;
- if (_3 > _4)
- goto <bb 11>; [INV]
- else
- goto <bb 14>; [INV]
- <bb 11> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_27 : "i" 16 : "memory");
- <bb 12> :
- <bb 13> :
- goto <bb 13>; [INV]
- <bb 14> :
- _5 = pxStreamBuffer_16(D)->pucBuffer;
- _6 = _5 + xTail_17(D);
- memcpy (pucData_19(D), _6, xFirstLength_18);
- if (xCount_14(D) > xFirstLength_18)
- goto <bb 15>; [INV]
- else
- goto <bb 16>; [INV]
- <bb 15> :
- _7 = pucData_19(D) + xFirstLength_18;
- _8 = pxStreamBuffer_16(D)->pucBuffer;
- _9 = xCount_14(D) - xFirstLength_18;
- memcpy (_7, _8, _9);
- <bb 16> :
- xTail_22 = xTail_17(D) + xCount_14(D);
- _10 = pxStreamBuffer_16(D)->xLength;
- if (xTail_22 >= _10)
- goto <bb 17>; [INV]
- else
- goto <bb 18>; [INV]
- <bb 17> :
- _11 = pxStreamBuffer_16(D)->xLength;
- xTail_23 = xTail_22 - _11;
- <bb 18> :
- # xTail_12 = PHI <xTail_22(16), xTail_23(17)>
- _24 = xTail_12;
- <bb 19> :
- <L14>:
- return _24;
- }
- prvWriteBytesToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
- {
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- size_t xFirstLength;
- size_t D.6562;
- unsigned int _1;
- unsigned int _2;
- unsigned int _3;
- unsigned int _4;
- uint8_t * _5;
- uint8_t * _6;
- unsigned int _7;
- unsigned int _8;
- uint8_t * _9;
- const uint8_t * _10;
- unsigned int _11;
- unsigned int _12;
- unsigned int _13;
- size_t _26;
- <bb 2> :
- if (xCount_16(D) == 0)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_27 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- _1 = pxStreamBuffer_18(D)->xLength;
- _2 = _1 - xHead_19(D);
- xFirstLength_20 = MIN_EXPR <xCount_16(D), _2>;
- _3 = xHead_19(D) + xFirstLength_20;
- _4 = pxStreamBuffer_18(D)->xLength;
- if (_3 > _4)
- goto <bb 7>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 7> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_28 : "i" 16 : "memory");
- <bb 8> :
- <bb 9> :
- goto <bb 9>; [INV]
- <bb 10> :
- _5 = pxStreamBuffer_18(D)->pucBuffer;
- _6 = _5 + xHead_19(D);
- memcpy (_6, pucData_21(D), xFirstLength_20);
- if (xCount_16(D) > xFirstLength_20)
- goto <bb 11>; [INV]
- else
- goto <bb 16>; [INV]
- <bb 11> :
- _7 = xCount_16(D) - xFirstLength_20;
- _8 = pxStreamBuffer_18(D)->xLength;
- if (_7 > _8)
- goto <bb 12>; [INV]
- else
- goto <bb 15>; [INV]
- <bb 12> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_29 : "i" 16 : "memory");
- <bb 13> :
- <bb 14> :
- goto <bb 14>; [INV]
- <bb 15> :
- _9 = pxStreamBuffer_18(D)->pucBuffer;
- _10 = pucData_21(D) + xFirstLength_20;
- _11 = xCount_16(D) - xFirstLength_20;
- memcpy (_9, _10, _11);
- <bb 16> :
- xHead_24 = xHead_19(D) + xCount_16(D);
- _12 = pxStreamBuffer_18(D)->xLength;
- if (xHead_24 >= _12)
- goto <bb 17>; [INV]
- else
- goto <bb 18>; [INV]
- <bb 17> :
- _13 = pxStreamBuffer_18(D)->xLength;
- xHead_25 = xHead_24 - _13;
- <bb 18> :
- # xHead_14 = PHI <xHead_24(16), xHead_25(17)>
- _26 = xHead_14;
- <bb 19> :
- <L15>:
- return _26;
- }
- xStreamBufferReceiveCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
- {
- uint32_t ulNewMaskValue;
- uint32_t D.6632;
- uint32_t ulOriginalBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t D.6631;
- uint32_t ulNewBASEPRI;
- UBaseType_t uxSavedInterruptStatus;
- BaseType_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- BaseType_t D.6548;
- struct tskTaskControlBlock * _1;
- struct tskTaskControlBlock * _2;
- BaseType_t _14;
- long unsigned int _18;
- <bb 2> :
- pxStreamBuffer_6 = xStreamBuffer_5(D);
- if (pxStreamBuffer_6 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- __asm__ __volatile__(" mrs %0, basepri
- mov %1, %2
- msr basepri, %1
- isb
- dsb
- " : "=r" ulOriginalBASEPRI_16, "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
- _18 = ulOriginalBASEPRI_16;
- <bb 7> :
- <L7>:
- _21 = _18;
- <bb 8> :
- uxSavedInterruptStatus_8 = _21;
- _1 ={v} pxStreamBuffer_6->xTaskWaitingToSend;
- if (_1 != 0B)
- goto <bb 9>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 9> :
- _2 ={v} pxStreamBuffer_6->xTaskWaitingToSend;
- xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_10(D));
- pxStreamBuffer_6->xTaskWaitingToSend ={v} 0B;
- xReturn_13 = 1;
- goto <bb 11>; [INV]
- <bb 10> :
- xReturn_9 = 0;
- <bb 11> :
- # xReturn_3 = PHI <xReturn_13(9), xReturn_9(10)>
- ulNewMaskValue_19 = uxSavedInterruptStatus_8;
- __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_19 : "memory");
- <bb 12> :
- _14 = xReturn_3;
- <bb 13> :
- <L6>:
- return _14;
- }
- xStreamBufferSendCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
- {
- uint32_t ulNewMaskValue;
- uint32_t D.6625;
- uint32_t ulOriginalBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t D.6624;
- uint32_t ulNewBASEPRI;
- UBaseType_t uxSavedInterruptStatus;
- BaseType_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- BaseType_t D.6541;
- struct tskTaskControlBlock * _1;
- struct tskTaskControlBlock * _2;
- BaseType_t _14;
- long unsigned int _18;
- <bb 2> :
- pxStreamBuffer_6 = xStreamBuffer_5(D);
- if (pxStreamBuffer_6 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- __asm__ __volatile__(" mrs %0, basepri
- mov %1, %2
- msr basepri, %1
- isb
- dsb
- " : "=r" ulOriginalBASEPRI_16, "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
- _18 = ulOriginalBASEPRI_16;
- <bb 7> :
- <L7>:
- _21 = _18;
- <bb 8> :
- uxSavedInterruptStatus_8 = _21;
- _1 ={v} pxStreamBuffer_6->xTaskWaitingToReceive;
- if (_1 != 0B)
- goto <bb 9>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 9> :
- _2 ={v} pxStreamBuffer_6->xTaskWaitingToReceive;
- xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_10(D));
- pxStreamBuffer_6->xTaskWaitingToReceive ={v} 0B;
- xReturn_13 = 1;
- goto <bb 11>; [INV]
- <bb 10> :
- xReturn_9 = 0;
- <bb 11> :
- # xReturn_3 = PHI <xReturn_13(9), xReturn_9(10)>
- ulNewMaskValue_19 = uxSavedInterruptStatus_8;
- __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_19 : "memory");
- <bb 12> :
- _14 = xReturn_3;
- <bb 13> :
- <L6>:
- return _14;
- }
- xStreamBufferIsFull (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- const struct StreamBuffer_t * const pxStreamBuffer;
- size_t xBytesToStoreMessageLength;
- BaseType_t xReturn;
- BaseType_t D.6534;
- unsigned char _1;
- int _2;
- int _3;
- unsigned int _4;
- BaseType_t _15;
- <bb 2> :
- pxStreamBuffer_8 = xStreamBuffer_7(D);
- if (pxStreamBuffer_8 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_16 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- _1 = pxStreamBuffer_8->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 7>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 7> :
- xBytesToStoreMessageLength_11 = 4;
- goto <bb 9>; [INV]
- <bb 8> :
- xBytesToStoreMessageLength_10 = 0;
- <bb 9> :
- # xBytesToStoreMessageLength_6 = PHI <xBytesToStoreMessageLength_11(7), xBytesToStoreMessageLength_10(8)>
- _4 = xStreamBufferSpacesAvailable (xStreamBuffer_7(D));
- if (xBytesToStoreMessageLength_6 >= _4)
- goto <bb 10>; [INV]
- else
- goto <bb 11>; [INV]
- <bb 10> :
- xReturn_14 = 1;
- goto <bb 12>; [INV]
- <bb 11> :
- xReturn_13 = 0;
- <bb 12> :
- # xReturn_5 = PHI <xReturn_14(10), xReturn_13(11)>
- _15 = xReturn_5;
- <bb 13> :
- <L9>:
- return _15;
- }
- xStreamBufferIsEmpty (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- size_t xTail;
- BaseType_t xReturn;
- const struct StreamBuffer_t * const pxStreamBuffer;
- BaseType_t D.6524;
- unsigned int _1;
- BaseType_t _9;
- <bb 2> :
- pxStreamBuffer_4 = xStreamBuffer_3(D);
- if (pxStreamBuffer_4 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- xTail_6 ={v} pxStreamBuffer_4->xTail;
- _1 ={v} pxStreamBuffer_4->xHead;
- if (xTail_6 == _1)
- goto <bb 7>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 7> :
- xReturn_8 = 1;
- goto <bb 9>; [INV]
- <bb 8> :
- xReturn_7 = 0;
- <bb 9> :
- # xReturn_2 = PHI <xReturn_8(7), xReturn_7(8)>
- _9 = xReturn_2;
- <bb 10> :
- <L6>:
- return _9;
- }
- prvReadMessageFromBuffer (struct StreamBuffer_t * pxStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable)
- {
- size_t xNextTail;
- size_t xTempNextMessageLength;
- size_t xNextMessageLength;
- size_t xCount;
- size_t D.6516;
- unsigned char _1;
- int _2;
- int _3;
- unsigned int _4;
- size_t _25;
- <bb 2> :
- xNextTail_12 ={v} pxStreamBuffer_11(D)->xTail;
- _1 = pxStreamBuffer_11(D)->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 3> :
- xNextTail_17 = prvReadBytesFromBuffer (pxStreamBuffer_11(D), &xTempNextMessageLength, 4, xNextTail_12);
- xNextMessageLength_18 = xTempNextMessageLength;
- xBytesAvailable_19 = xBytesAvailable_15(D) + 4294967292;
- if (xNextMessageLength_18 > xBufferLengthBytes_13(D))
- goto <bb 4>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 4> :
- xNextMessageLength_20 = 0;
- goto <bb 6>; [INV]
- <bb 5> :
- xNextMessageLength_14 = xBufferLengthBytes_13(D);
- <bb 6> :
- # xBytesAvailable_5 = PHI <xBytesAvailable_19(4), xBytesAvailable_15(D)(5), xBytesAvailable_19(3)>
- # xNextMessageLength_6 = PHI <xNextMessageLength_20(4), xNextMessageLength_14(5), xNextMessageLength_18(3)>
- # xNextTail_7 = PHI <xNextTail_17(4), xNextTail_12(5), xNextTail_17(3)>
- xCount_21 = MIN_EXPR <xBytesAvailable_5, xNextMessageLength_6>;
- if (xCount_21 != 0)
- goto <bb 7>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 7> :
- _4 = prvReadBytesFromBuffer (pxStreamBuffer_11(D), pvRxData_22(D), xCount_21, xNextTail_7);
- pxStreamBuffer_11(D)->xTail ={v} _4;
- <bb 8> :
- _25 = xCount_21;
- xTempNextMessageLength ={v} {CLOBBER};
- <bb 9> :
- <L9>:
- return _25;
- }
- xStreamBufferReceiveFromISR (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
- {
- uint32_t ulNewMaskValue;
- uint32_t D.6664;
- uint32_t ulOriginalBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t D.6663;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- UBaseType_t uxSavedInterruptStatus;
- size_t xBytesToStoreMessageLength;
- size_t xBytesAvailable;
- size_t xReceivedLength;
- struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6506;
- unsigned char _1;
- int _2;
- int _3;
- struct tskTaskControlBlock * _4;
- struct tskTaskControlBlock * _5;
- size_t _26;
- long unsigned int _31;
- <bb 2> :
- pxStreamBuffer_11 = xStreamBuffer_10(D);
- xReceivedLength_12 = 0;
- if (pvRxData_13(D) == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_27 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- if (pxStreamBuffer_11 == 0B)
- goto <bb 7>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 7> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_28 : "i" 16 : "memory");
- <bb 8> :
- <bb 9> :
- goto <bb 9>; [INV]
- <bb 10> :
- _1 = pxStreamBuffer_11->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 11>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 11> :
- xBytesToStoreMessageLength_16 = 4;
- goto <bb 13>; [INV]
- <bb 12> :
- xBytesToStoreMessageLength_15 = 0;
- <bb 13> :
- # xBytesToStoreMessageLength_7 = PHI <xBytesToStoreMessageLength_16(11), xBytesToStoreMessageLength_15(12)>
- xBytesAvailable_18 = prvBytesInBuffer (pxStreamBuffer_11);
- if (xBytesAvailable_18 > xBytesToStoreMessageLength_7)
- goto <bb 14>; [INV]
- else
- goto <bb 21>; [INV]
- <bb 14> :
- xReceivedLength_21 = prvReadMessageFromBuffer (pxStreamBuffer_11, pvRxData_13(D), xBufferLengthBytes_19(D), xBytesAvailable_18);
- if (xReceivedLength_21 != 0)
- goto <bb 15>; [INV]
- else
- goto <bb 21>; [INV]
- <bb 15> :
- __asm__ __volatile__(" mrs %0, basepri
- mov %1, %2
- msr basepri, %1
- isb
- dsb
- " : "=r" ulOriginalBASEPRI_29, "=r" ulNewBASEPRI_30 : "i" 16 : "memory");
- _31 = ulOriginalBASEPRI_29;
- <bb 16> :
- <L18>:
- _34 = _31;
- <bb 17> :
- uxSavedInterruptStatus_22 = _34;
- _4 ={v} pxStreamBuffer_11->xTaskWaitingToSend;
- if (_4 != 0B)
- goto <bb 18>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 18> :
- _5 ={v} pxStreamBuffer_11->xTaskWaitingToSend;
- xTaskGenericNotifyFromISR (_5, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_23(D));
- pxStreamBuffer_11->xTaskWaitingToSend ={v} 0B;
- <bb 19> :
- ulNewMaskValue_32 = uxSavedInterruptStatus_22;
- __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_32 : "memory");
- <bb 20> :
- <bb 21> :
- # xReceivedLength_6 = PHI <xReceivedLength_12(13), xReceivedLength_21(20), xReceivedLength_21(14)>
- _26 = xReceivedLength_6;
- <bb 22> :
- <L17>:
- return _26;
- }
- xStreamBufferNextMessageLengthBytes (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- size_t xTempReturn;
- size_t xBytesAvailable;
- size_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6488;
- unsigned char _1;
- int _2;
- int _3;
- unsigned int _4;
- size_t _16;
- <bb 2> :
- pxStreamBuffer_8 = xStreamBuffer_7(D);
- if (pxStreamBuffer_8 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_18 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- _1 = pxStreamBuffer_8->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 7>; [INV]
- else
- goto <bb 14>; [INV]
- <bb 7> :
- xBytesAvailable_12 = prvBytesInBuffer (pxStreamBuffer_8);
- if (xBytesAvailable_12 > 4)
- goto <bb 8>; [INV]
- else
- goto <bb 9>; [INV]
- <bb 8> :
- _4 ={v} pxStreamBuffer_8->xTail;
- prvReadBytesFromBuffer (pxStreamBuffer_8, &xTempReturn, 4, _4);
- xReturn_15 = xTempReturn;
- goto <bb 15>; [INV]
- <bb 9> :
- if (xBytesAvailable_12 != 0)
- goto <bb 10>; [INV]
- else
- goto <bb 13>; [INV]
- <bb 10> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_19 : "i" 16 : "memory");
- <bb 11> :
- <bb 12> :
- goto <bb 12>; [INV]
- <bb 13> :
- xReturn_13 = 0;
- goto <bb 15>; [INV]
- <bb 14> :
- xReturn_10 = 0;
- <bb 15> :
- # xReturn_5 = PHI <xReturn_13(13), xReturn_10(14), xReturn_15(8)>
- _16 = xReturn_5;
- xTempReturn ={v} {CLOBBER};
- <bb 16> :
- <L13>:
- return _16;
- }
- xStreamBufferReceive (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait)
- {
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- size_t xBytesToStoreMessageLength;
- size_t xBytesAvailable;
- size_t xReceivedLength;
- struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6476;
- unsigned char _1;
- int _2;
- int _3;
- struct tskTaskControlBlock * _4;
- struct tskTaskControlBlock * _5;
- struct tskTaskControlBlock * _6;
- struct tskTaskControlBlock * _7;
- size_t _43;
- <bb 2> :
- pxStreamBuffer_16 = xStreamBuffer_15(D);
- xReceivedLength_17 = 0;
- if (pvRxData_18(D) == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_44 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- if (pxStreamBuffer_16 == 0B)
- goto <bb 7>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 7> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_45 : "i" 16 : "memory");
- <bb 8> :
- <bb 9> :
- goto <bb 9>; [INV]
- <bb 10> :
- _1 = pxStreamBuffer_16->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 11>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 11> :
- xBytesToStoreMessageLength_21 = 4;
- goto <bb 13>; [INV]
- <bb 12> :
- xBytesToStoreMessageLength_20 = 0;
- <bb 13> :
- # xBytesToStoreMessageLength_10 = PHI <xBytesToStoreMessageLength_21(11), xBytesToStoreMessageLength_20(12)>
- if (xTicksToWait_22(D) != 0)
- goto <bb 14>; [INV]
- else
- goto <bb 22>; [INV]
- <bb 14> :
- vPortEnterCritical ();
- xBytesAvailable_27 = prvBytesInBuffer (pxStreamBuffer_16);
- if (xBytesAvailable_27 <= xBytesToStoreMessageLength_10)
- goto <bb 15>; [INV]
- else
- goto <bb 20>; [INV]
- <bb 15> :
- xTaskGenericNotifyStateClear (0B, 0);
- _4 ={v} pxStreamBuffer_16->xTaskWaitingToReceive;
- if (_4 != 0B)
- goto <bb 16>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 16> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_46 : "i" 16 : "memory");
- <bb 17> :
- <bb 18> :
- goto <bb 18>; [INV]
- <bb 19> :
- _5 = xTaskGetCurrentTaskHandle ();
- pxStreamBuffer_16->xTaskWaitingToReceive ={v} _5;
- <bb 20> :
- vPortExitCritical ();
- if (xBytesAvailable_27 <= xBytesToStoreMessageLength_10)
- goto <bb 21>; [INV]
- else
- goto <bb 23>; [INV]
- <bb 21> :
- xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait_22(D));
- pxStreamBuffer_16->xTaskWaitingToReceive ={v} 0B;
- xBytesAvailable_35 = prvBytesInBuffer (pxStreamBuffer_16);
- goto <bb 23>; [INV]
- <bb 22> :
- xBytesAvailable_24 = prvBytesInBuffer (pxStreamBuffer_16);
- <bb 23> :
- # xBytesAvailable_9 = PHI <xBytesAvailable_35(21), xBytesAvailable_24(22), xBytesAvailable_27(20)>
- if (xBytesAvailable_9 > xBytesToStoreMessageLength_10)
- goto <bb 24>; [INV]
- else
- goto <bb 28>; [INV]
- <bb 24> :
- xReceivedLength_38 = prvReadMessageFromBuffer (pxStreamBuffer_16, pvRxData_18(D), xBufferLengthBytes_36(D), xBytesAvailable_9);
- if (xReceivedLength_38 != 0)
- goto <bb 25>; [INV]
- else
- goto <bb 28>; [INV]
- <bb 25> :
- vTaskSuspendAll ();
- _6 ={v} pxStreamBuffer_16->xTaskWaitingToSend;
- if (_6 != 0B)
- goto <bb 26>; [INV]
- else
- goto <bb 27>; [INV]
- <bb 26> :
- _7 ={v} pxStreamBuffer_16->xTaskWaitingToSend;
- xTaskGenericNotify (_7, 0, 0, 0, 0B);
- pxStreamBuffer_16->xTaskWaitingToSend ={v} 0B;
- <bb 27> :
- xTaskResumeAll ();
- <bb 28> :
- # xReceivedLength_8 = PHI <xReceivedLength_17(23), xReceivedLength_38(27), xReceivedLength_38(24)>
- _43 = xReceivedLength_8;
- <bb 29> :
- <L29>:
- return _43;
- }
- prvWriteMessageToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace)
- {
- size_t xNextHead;
- size_t D.6448;
- unsigned char _1;
- int _2;
- int _3;
- unsigned int xDataLengthBytes.2_4;
- unsigned int _5;
- unsigned int xDataLengthBytes.3_6;
- unsigned int xDataLengthBytes.4_7;
- unsigned int _8;
- size_t _24;
- <bb 2> :
- xNextHead_14 ={v} pxStreamBuffer_13(D)->xHead;
- _1 = pxStreamBuffer_13(D)->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- if (xSpace_15(D) >= xRequiredSpace_17(D))
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- xNextHead_20 = prvWriteBytesToBuffer (pxStreamBuffer_13(D), &xDataLengthBytes, 4, xNextHead_14);
- goto <bb 7>; [INV]
- <bb 5> :
- xDataLengthBytes = 0;
- goto <bb 7>; [INV]
- <bb 6> :
- xDataLengthBytes.2_4 = xDataLengthBytes;
- _5 = MIN_EXPR <xSpace_15(D), xDataLengthBytes.2_4>;
- xDataLengthBytes = _5;
- <bb 7> :
- # xNextHead_9 = PHI <xNextHead_14(5), xNextHead_14(6), xNextHead_20(4)>
- xDataLengthBytes.3_6 = xDataLengthBytes;
- if (xDataLengthBytes.3_6 != 0)
- goto <bb 8>; [INV]
- else
- goto <bb 9>; [INV]
- <bb 8> :
- xDataLengthBytes.4_7 = xDataLengthBytes;
- _8 = prvWriteBytesToBuffer (pxStreamBuffer_13(D), pvTxData_21(D), xDataLengthBytes.4_7, xNextHead_9);
- pxStreamBuffer_13(D)->xHead ={v} _8;
- <bb 9> :
- _24 = xDataLengthBytes;
- <bb 10> :
- <L8>:
- return _24;
- }
- xStreamBufferSendFromISR (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
- {
- uint32_t ulNewMaskValue;
- uint32_t D.6651;
- uint32_t ulOriginalBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t D.6650;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- UBaseType_t uxSavedInterruptStatus;
- size_t xRequiredSpace;
- size_t xSpace;
- size_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6436;
- unsigned char _1;
- int _2;
- int _3;
- unsigned int _4;
- unsigned int _5;
- struct tskTaskControlBlock * _6;
- struct tskTaskControlBlock * _7;
- size_t _27;
- long unsigned int _32;
- <bb 2> :
- pxStreamBuffer_12 = xStreamBuffer_11(D);
- xRequiredSpace_14 = xDataLengthBytes_13(D);
- if (pvTxData_15(D) == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_28 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- if (pxStreamBuffer_12 == 0B)
- goto <bb 7>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 7> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_29 : "i" 16 : "memory");
- <bb 8> :
- <bb 9> :
- goto <bb 9>; [INV]
- <bb 10> :
- _1 = pxStreamBuffer_12->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 1;
- if (_3 != 0)
- goto <bb 11>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 11> :
- xRequiredSpace_17 = xRequiredSpace_14 + 4;
- <bb 12> :
- # xRequiredSpace_8 = PHI <xRequiredSpace_14(10), xRequiredSpace_17(11)>
- xSpace_19 = xStreamBufferSpacesAvailable (pxStreamBuffer_12);
- xReturn_21 = prvWriteMessageToBuffer (pxStreamBuffer_12, pvTxData_15(D), xDataLengthBytes_13(D), xSpace_19, xRequiredSpace_8);
- if (xReturn_21 != 0)
- goto <bb 13>; [INV]
- else
- goto <bb 20>; [INV]
- <bb 13> :
- _4 = prvBytesInBuffer (pxStreamBuffer_12);
- _5 = pxStreamBuffer_12->xTriggerLevelBytes;
- if (_4 >= _5)
- goto <bb 14>; [INV]
- else
- goto <bb 20>; [INV]
- <bb 14> :
- __asm__ __volatile__(" mrs %0, basepri
- mov %1, %2
- msr basepri, %1
- isb
- dsb
- " : "=r" ulOriginalBASEPRI_30, "=r" ulNewBASEPRI_31 : "i" 16 : "memory");
- _32 = ulOriginalBASEPRI_30;
- <bb 15> :
- <L18>:
- _35 = _32;
- <bb 16> :
- uxSavedInterruptStatus_23 = _35;
- _6 ={v} pxStreamBuffer_12->xTaskWaitingToReceive;
- if (_6 != 0B)
- goto <bb 17>; [INV]
- else
- goto <bb 18>; [INV]
- <bb 17> :
- _7 ={v} pxStreamBuffer_12->xTaskWaitingToReceive;
- xTaskGenericNotifyFromISR (_7, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_24(D));
- pxStreamBuffer_12->xTaskWaitingToReceive ={v} 0B;
- <bb 18> :
- ulNewMaskValue_33 = uxSavedInterruptStatus_23;
- __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_33 : "memory");
- <bb 19> :
- <bb 20> :
- _27 = xReturn_21;
- <bb 21> :
- <L17>:
- return _27;
- }
- xStreamBufferSend (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait)
- {
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- size_t xMaxReportedSpace;
- struct TimeOut_t xTimeOut;
- size_t xRequiredSpace;
- size_t xSpace;
- size_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6418;
- unsigned int _1;
- unsigned char _2;
- int _3;
- int _4;
- long unsigned int xTicksToWait.0_5;
- struct tskTaskControlBlock * _6;
- struct tskTaskControlBlock * _7;
- long unsigned int xTicksToWait.1_8;
- long int _9;
- unsigned int _10;
- unsigned int _11;
- struct tskTaskControlBlock * _12;
- struct tskTaskControlBlock * _13;
- size_t _57;
- <bb 2> :
- pxStreamBuffer_25 = xStreamBuffer_24(D);
- xSpace_26 = 0;
- xRequiredSpace_28 = xDataLengthBytes_27(D);
- xMaxReportedSpace_29 = 0;
- if (pvTxData_30(D) == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_59 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- if (pxStreamBuffer_25 == 0B)
- goto <bb 7>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 7> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_60 : "i" 16 : "memory");
- <bb 8> :
- <bb 9> :
- goto <bb 9>; [INV]
- <bb 10> :
- _1 = pxStreamBuffer_25->xLength;
- xMaxReportedSpace_32 = _1 + 4294967295;
- _2 = pxStreamBuffer_25->ucFlags;
- _3 = (int) _2;
- _4 = _3 & 1;
- if (_4 != 0)
- goto <bb 11>; [INV]
- else
- goto <bb 17>; [INV]
- <bb 11> :
- xRequiredSpace_34 = xRequiredSpace_28 + 4;
- if (xRequiredSpace_34 <= xDataLengthBytes_27(D))
- goto <bb 12>; [INV]
- else
- goto <bb 15>; [INV]
- <bb 12> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_61 : "i" 16 : "memory");
- <bb 13> :
- <bb 14> :
- goto <bb 14>; [INV]
- <bb 15> :
- if (xRequiredSpace_34 > xMaxReportedSpace_32)
- goto <bb 16>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 16> :
- xTicksToWait = 0;
- goto <bb 19>; [INV]
- <bb 17> :
- if (xRequiredSpace_28 > xMaxReportedSpace_32)
- goto <bb 18>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 18> :
- xRequiredSpace_33 = xMaxReportedSpace_32;
- <bb 19> :
- # xRequiredSpace_16 = PHI <xRequiredSpace_34(16), xRequiredSpace_28(17), xRequiredSpace_33(18), xRequiredSpace_34(15)>
- xTicksToWait.0_5 = xTicksToWait;
- if (xTicksToWait.0_5 != 0)
- goto <bb 20>; [INV]
- else
- goto <bb 30>; [INV]
- <bb 20> :
- vTaskSetTimeOutState (&xTimeOut);
- <bb 21> :
- vPortEnterCritical ();
- xSpace_39 = xStreamBufferSpacesAvailable (pxStreamBuffer_25);
- if (xSpace_39 < xRequiredSpace_16)
- goto <bb 22>; [INV]
- else
- goto <bb 27>; [INV]
- <bb 22> :
- xTaskGenericNotifyStateClear (0B, 0);
- _6 ={v} pxStreamBuffer_25->xTaskWaitingToSend;
- if (_6 != 0B)
- goto <bb 23>; [INV]
- else
- goto <bb 26>; [INV]
- <bb 23> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_62 : "i" 16 : "memory");
- <bb 24> :
- <bb 25> :
- goto <bb 25>; [INV]
- <bb 26> :
- _7 = xTaskGetCurrentTaskHandle ();
- pxStreamBuffer_25->xTaskWaitingToSend ={v} _7;
- goto <bb 28>; [INV]
- <bb 27> :
- vPortExitCritical ();
- goto <bb 29>; [INV]
- <bb 28> :
- vPortExitCritical ();
- xTicksToWait.1_8 = xTicksToWait;
- xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait.1_8);
- pxStreamBuffer_25->xTaskWaitingToSend ={v} 0B;
- _9 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
- if (_9 == 0)
- goto <bb 21>; [INV]
- else
- goto <bb 29>; [INV]
- <bb 29> :
- <bb 30> :
- # xSpace_14 = PHI <xSpace_26(19), xSpace_39(29)>
- if (xSpace_14 == 0)
- goto <bb 31>; [INV]
- else
- goto <bb 32>; [INV]
- <bb 31> :
- xSpace_49 = xStreamBufferSpacesAvailable (pxStreamBuffer_25);
- <bb 32> :
- # xSpace_15 = PHI <xSpace_14(30), xSpace_49(31)>
- xReturn_51 = prvWriteMessageToBuffer (pxStreamBuffer_25, pvTxData_30(D), xDataLengthBytes_27(D), xSpace_15, xRequiredSpace_16);
- if (xReturn_51 != 0)
- goto <bb 33>; [INV]
- else
- goto <bb 37>; [INV]
- <bb 33> :
- _10 = prvBytesInBuffer (pxStreamBuffer_25);
- _11 = pxStreamBuffer_25->xTriggerLevelBytes;
- if (_10 >= _11)
- goto <bb 34>; [INV]
- else
- goto <bb 37>; [INV]
- <bb 34> :
- vTaskSuspendAll ();
- _12 ={v} pxStreamBuffer_25->xTaskWaitingToReceive;
- if (_12 != 0B)
- goto <bb 35>; [INV]
- else
- goto <bb 36>; [INV]
- <bb 35> :
- _13 ={v} pxStreamBuffer_25->xTaskWaitingToReceive;
- xTaskGenericNotify (_13, 0, 0, 0, 0B);
- pxStreamBuffer_25->xTaskWaitingToReceive ={v} 0B;
- <bb 36> :
- xTaskResumeAll ();
- <bb 37> :
- _57 = xReturn_51;
- xTimeOut ={v} {CLOBBER};
- <bb 38> :
- <L41>:
- return _57;
- }
- xStreamBufferBytesAvailable (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- size_t xReturn;
- const struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6382;
- size_t _6;
- <bb 2> :
- pxStreamBuffer_2 = xStreamBuffer_1(D);
- if (pxStreamBuffer_2 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- xReturn_5 = prvBytesInBuffer (pxStreamBuffer_2);
- _6 = xReturn_5;
- <bb 7> :
- <L3>:
- return _6;
- }
- xStreamBufferSpacesAvailable (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- size_t xOriginalTail;
- size_t xSpace;
- const struct StreamBuffer_t * const pxStreamBuffer;
- size_t D.6378;
- unsigned int D.6374;
- unsigned int _1;
- unsigned int _2;
- unsigned int _3;
- unsigned int _4;
- unsigned int _5;
- unsigned int _12;
- size_t _16;
- <bb 2> :
- pxStreamBuffer_8 = xStreamBuffer_7(D);
- if (pxStreamBuffer_8 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- xOriginalTail_10 ={v} pxStreamBuffer_8->xTail;
- _1 = pxStreamBuffer_8->xLength;
- _2 ={v} pxStreamBuffer_8->xTail;
- xSpace_11 = _1 + _2;
- _12 ={v} pxStreamBuffer_8->xHead;
- xSpace_13 = xSpace_11 - _12;
- _3 ={v} pxStreamBuffer_8->xTail;
- if (xOriginalTail_10 != _3)
- goto <bb 6>; [INV]
- else
- goto <bb 7>; [INV]
- <bb 7> :
- xSpace_14 = xSpace_13 + 4294967295;
- _4 = pxStreamBuffer_8->xLength;
- if (xSpace_14 >= _4)
- goto <bb 8>; [INV]
- else
- goto <bb 9>; [INV]
- <bb 8> :
- _5 = pxStreamBuffer_8->xLength;
- xSpace_15 = xSpace_14 - _5;
- <bb 9> :
- # xSpace_6 = PHI <xSpace_14(7), xSpace_15(8)>
- _16 = xSpace_6;
- <bb 10> :
- <L8>:
- return _16;
- }
- xStreamBufferSetTriggerLevel (struct StreamBufferDef_t * xStreamBuffer, size_t xTriggerLevel)
- {
- uint32_t ulNewBASEPRI;
- BaseType_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- BaseType_t D.6370;
- unsigned int _1;
- BaseType_t _13;
- <bb 2> :
- pxStreamBuffer_6 = xStreamBuffer_5(D);
- if (pxStreamBuffer_6 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- if (xTriggerLevel_7(D) == 0)
- goto <bb 7>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 7> :
- xTriggerLevel_8 = 1;
- <bb 8> :
- # xTriggerLevel_2 = PHI <xTriggerLevel_7(D)(6), xTriggerLevel_8(7)>
- _1 = pxStreamBuffer_6->xLength;
- if (xTriggerLevel_2 < _1)
- goto <bb 9>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 9> :
- pxStreamBuffer_6->xTriggerLevelBytes = xTriggerLevel_2;
- xReturn_12 = 1;
- goto <bb 11>; [INV]
- <bb 10> :
- xReturn_10 = 0;
- <bb 11> :
- # xReturn_3 = PHI <xReturn_12(9), xReturn_10(10)>
- _13 = xReturn_3;
- <bb 12> :
- <L8>:
- return _13;
- }
- xStreamBufferReset (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- UBaseType_t uxStreamBufferNumber;
- BaseType_t xReturn;
- struct StreamBuffer_t * const pxStreamBuffer;
- BaseType_t D.6361;
- struct tskTaskControlBlock * _1;
- struct tskTaskControlBlock * _2;
- uint8_t * _3;
- unsigned int _4;
- unsigned int _5;
- unsigned char _6;
- BaseType_t _19;
- <bb 2> :
- pxStreamBuffer_10 = xStreamBuffer_9(D);
- xReturn_11 = 0;
- if (pxStreamBuffer_10 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_20 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- uxStreamBufferNumber_13 = pxStreamBuffer_10->uxStreamBufferNumber;
- vPortEnterCritical ();
- _1 ={v} pxStreamBuffer_10->xTaskWaitingToReceive;
- if (_1 == 0B)
- goto <bb 7>; [INV]
- else
- goto <bb 9>; [INV]
- <bb 7> :
- _2 ={v} pxStreamBuffer_10->xTaskWaitingToSend;
- if (_2 == 0B)
- goto <bb 8>; [INV]
- else
- goto <bb 9>; [INV]
- <bb 8> :
- _3 = pxStreamBuffer_10->pucBuffer;
- _4 = pxStreamBuffer_10->xLength;
- _5 = pxStreamBuffer_10->xTriggerLevelBytes;
- _6 = pxStreamBuffer_10->ucFlags;
- prvInitialiseNewStreamBuffer (pxStreamBuffer_10, _3, _4, _5, _6);
- xReturn_16 = 1;
- pxStreamBuffer_10->uxStreamBufferNumber = uxStreamBufferNumber_13;
- <bb 9> :
- # xReturn_7 = PHI <xReturn_11(6), xReturn_11(7), xReturn_16(8)>
- vPortExitCritical ();
- _19 = xReturn_7;
- <bb 10> :
- <L7>:
- return _19;
- }
- vStreamBufferDelete (struct StreamBufferDef_t * xStreamBuffer)
- {
- uint32_t ulNewBASEPRI;
- struct StreamBuffer_t * pxStreamBuffer;
- unsigned char _1;
- int _2;
- int _3;
- <bb 2> :
- pxStreamBuffer_6 = xStreamBuffer_5(D);
- if (pxStreamBuffer_6 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 3> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
- <bb 4> :
- <bb 5> :
- goto <bb 5>; [INV]
- <bb 6> :
- _1 = pxStreamBuffer_6->ucFlags;
- _2 = (int) _1;
- _3 = _2 & 2;
- if (_3 == 0)
- goto <bb 7>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 7> :
- vPortFree (pxStreamBuffer_6);
- goto <bb 9>; [INV]
- <bb 8> :
- memset (pxStreamBuffer_6, 0, 36);
- <bb 9> :
- return;
- }
- xStreamBufferGenericCreate (size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer)
- {
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint32_t ulNewBASEPRI;
- uint8_t ucFlags;
- uint8_t * pucAllocatedMemory;
- struct StreamBufferDef_t * D.6348;
- unsigned int _1;
- uint8_t * _2;
- struct StreamBufferDef_t * _21;
- <bb 2> :
- if (xIsMessageBuffer_9(D) == 1)
- goto <bb 3>; [INV]
- else
- goto <bb 7>; [INV]
- <bb 3> :
- ucFlags_13 = 1;
- if (xBufferSizeBytes_11(D) <= 4)
- goto <bb 4>; [INV]
- else
- goto <bb 11>; [INV]
- <bb 4> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
- <bb 5> :
- <bb 6> :
- goto <bb 6>; [INV]
- <bb 7> :
- ucFlags_10 = 0;
- if (xBufferSizeBytes_11(D) == 0)
- goto <bb 8>; [INV]
- else
- goto <bb 11>; [INV]
- <bb 8> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
- <bb 9> :
- <bb 10> :
- goto <bb 10>; [INV]
- <bb 11> :
- # ucFlags_6 = PHI <ucFlags_13(3), ucFlags_10(7)>
- if (xTriggerLevelBytes_14(D) > xBufferSizeBytes_11(D))
- goto <bb 12>; [INV]
- else
- goto <bb 15>; [INV]
- <bb 12> :
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI_24 : "i" 16 : "memory");
- <bb 13> :
- <bb 14> :
- goto <bb 14>; [INV]
- <bb 15> :
- if (xTriggerLevelBytes_14(D) == 0)
- goto <bb 16>; [INV]
- else
- goto <bb 17>; [INV]
- <bb 16> :
- xTriggerLevelBytes_15 = 1;
- <bb 17> :
- # xTriggerLevelBytes_4 = PHI <xTriggerLevelBytes_14(D)(15), xTriggerLevelBytes_15(16)>
- if (xBufferSizeBytes_11(D) <= 4294967258)
- goto <bb 18>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 18> :
- xBufferSizeBytes_17 = xBufferSizeBytes_11(D) + 1;
- _1 = xBufferSizeBytes_17 + 36;
- pucAllocatedMemory_19 = pvPortMalloc (_1);
- goto <bb 20>; [INV]
- <bb 19> :
- pucAllocatedMemory_16 = 0B;
- <bb 20> :
- # xBufferSizeBytes_3 = PHI <xBufferSizeBytes_17(18), xBufferSizeBytes_11(D)(19)>
- # pucAllocatedMemory_5 = PHI <pucAllocatedMemory_19(18), pucAllocatedMemory_16(19)>
- if (pucAllocatedMemory_5 != 0B)
- goto <bb 21>; [INV]
- else
- goto <bb 22>; [INV]
- <bb 21> :
- _2 = pucAllocatedMemory_5 + 36;
- prvInitialiseNewStreamBuffer (pucAllocatedMemory_5, _2, xBufferSizeBytes_3, xTriggerLevelBytes_4, ucFlags_6);
- <bb 22> :
- _21 = pucAllocatedMemory_5;
- <bb 23> :
- <L20>:
- return _21;
- }
|