vEventGroupSetNumber (void * xEventGroup, UBaseType_t uxEventGroupNumber) { : MEM[(struct EventGroup_t *)xEventGroup].uxEventGroupNumber = uxEventGroupNumber; return; } uxEventGroupGetNumber (void * xEventGroup) { const struct EventGroup_t * pxEventBits; UBaseType_t xReturn; UBaseType_t D.6566; : pxEventBits = xEventGroup; if (xEventGroup == 0B) goto ; [INV] else goto ; [INV] : xReturn = 0; goto ; [INV] : xReturn = pxEventBits->uxEventGroupNumber; : D.6566 = xReturn; : : return D.6566; } xEventGroupSetBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, BaseType_t * pxHigherPriorityTaskWoken) { BaseType_t xReturn; BaseType_t D.6561; : xReturn = xTimerPendFunctionCallFromISR (vEventGroupSetBitsCallback, xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken); D.6561 = xReturn; : : return D.6561; } prvTestWaitCondition (const EventBits_t uxCurrentEventBits, const EventBits_t uxBitsToWaitFor, const BaseType_t xWaitForAllBits) { BaseType_t xWaitConditionMet; BaseType_t D.6559; : xWaitConditionMet = 0; if (xWaitForAllBits == 0) goto ; [INV] else goto ; [INV] : _1 = uxCurrentEventBits & uxBitsToWaitFor; if (_1 != 0) goto ; [INV] else goto ; [INV] : xWaitConditionMet = 1; goto ; [INV] : _2 = uxCurrentEventBits & uxBitsToWaitFor; if (uxBitsToWaitFor == _2) goto ; [INV] else goto ; [INV] : xWaitConditionMet = 1; : D.6559 = xWaitConditionMet; : : return D.6559; } vEventGroupClearBitsCallback (void * pvEventGroup, const uint32_t ulBitsToClear) { : xEventGroupClearBits (pvEventGroup, ulBitsToClear); return; } vEventGroupSetBitsCallback (void * pvEventGroup, const uint32_t ulBitsToSet) { : xEventGroupSetBits (pvEventGroup, ulBitsToSet); return; } vEventGroupDelete (struct EventGroupDef_t * xEventGroup) { const struct List_t * pxTasksWaitingForBits; struct EventGroup_t * pxEventBits; : if (xEventGroup == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : pxEventBits = xEventGroup; pxTasksWaitingForBits = &pxEventBits->xTasksWaitingForBits; vTaskSuspendAll (); goto ; [INV] : _1 = pxTasksWaitingForBits->xListEnd.pxNext; _2 = &pxTasksWaitingForBits->xListEnd; if (_1 == _2) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _3 = pxTasksWaitingForBits->xListEnd.pxNext; vTaskRemoveFromUnorderedEventList (_3, 33554432); : _4 = pxTasksWaitingForBits->uxNumberOfItems; if (_4 != 0) goto ; [INV] else goto ; [INV] : vPortFree (pxEventBits); xTaskResumeAll (); return; } xEventGroupSetBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet) { BaseType_t xMatchFound; struct EventGroup_t * pxEventBits; EventBits_t uxControlBits; EventBits_t uxBitsWaitedFor; EventBits_t uxBitsToClear; const struct List_t * pxList; const struct ListItem_t * pxListEnd; struct ListItem_t * pxNext; struct ListItem_t * pxListItem; EventBits_t D.6544; : uxBitsToClear = 0; pxEventBits = xEventGroup; xMatchFound = 0; if (xEventGroup == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = uxBitsToSet & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : pxList = &pxEventBits->xTasksWaitingForBits; pxListEnd = &pxList->xListEnd; vTaskSuspendAll (); pxListItem = pxList->xListEnd.pxNext; _2 = pxEventBits->uxEventBits; _3 = uxBitsToSet | _2; pxEventBits->uxEventBits = _3; goto ; [INV] : pxNext = pxListItem->pxNext; uxBitsWaitedFor = pxListItem->xItemValue; xMatchFound = 0; uxControlBits = uxBitsWaitedFor & 4278190080; uxBitsWaitedFor = uxBitsWaitedFor & 16777215; _4 = uxControlBits & 67108864; if (_4 == 0) goto ; [INV] else goto ; [INV] : _5 = pxEventBits->uxEventBits; _6 = uxBitsWaitedFor & _5; if (_6 != 0) goto ; [INV] else goto ; [INV] : xMatchFound = 1; goto ; [INV] : _7 = pxEventBits->uxEventBits; _8 = uxBitsWaitedFor & _7; if (uxBitsWaitedFor == _8) goto ; [INV] else goto ; [INV] : xMatchFound = 1; : if (xMatchFound != 0) goto ; [INV] else goto ; [INV] : _9 = uxControlBits & 16777216; if (_9 != 0) goto ; [INV] else goto ; [INV] : uxBitsToClear = uxBitsToClear | uxBitsWaitedFor; : _10 = pxEventBits->uxEventBits; _11 = _10 | 33554432; vTaskRemoveFromUnorderedEventList (pxListItem, _11); : pxListItem = pxNext; : if (pxListItem != pxListEnd) goto ; [INV] else goto ; [INV] : _12 = pxEventBits->uxEventBits; _13 = ~uxBitsToClear; _14 = _12 & _13; pxEventBits->uxEventBits = _14; xTaskResumeAll (); D.6544 = pxEventBits->uxEventBits; : : return D.6544; } xEventGroupGetBitsFromISR (struct EventGroupDef_t * xEventGroup) { EventBits_t uxReturn; const struct EventGroup_t * const pxEventBits; UBaseType_t uxSavedInterruptStatus; EventBits_t D.6522; : pxEventBits = xEventGroup; uxSavedInterruptStatus = ulPortRaiseBASEPRI (); uxReturn = pxEventBits->uxEventBits; vPortSetBASEPRI (uxSavedInterruptStatus); D.6522 = uxReturn; : : return D.6522; } xEventGroupClearBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear) { BaseType_t xReturn; BaseType_t D.6520; : xReturn = xTimerPendFunctionCallFromISR (vEventGroupClearBitsCallback, xEventGroup, uxBitsToClear, 0B); D.6520 = xReturn; : : return D.6520; } xEventGroupClearBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear) { EventBits_t uxReturn; struct EventGroup_t * pxEventBits; EventBits_t D.6518; : pxEventBits = xEventGroup; if (xEventGroup == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = uxBitsToClear & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : vPortEnterCritical (); uxReturn = pxEventBits->uxEventBits; _2 = pxEventBits->uxEventBits; _3 = ~uxBitsToClear; _4 = _2 & _3; pxEventBits->uxEventBits = _4; vPortExitCritical (); D.6518 = uxReturn; : : return D.6518; } xEventGroupWaitBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait) { const EventBits_t uxCurrentEventBits; BaseType_t xTimeoutOccurred; BaseType_t xAlreadyYielded; BaseType_t xWaitConditionMet; EventBits_t uxControlBits; EventBits_t uxReturn; struct EventGroup_t * pxEventBits; EventBits_t D.6512; int iftmp.1; : pxEventBits = xEventGroup; uxControlBits = 0; xTimeoutOccurred = 0; if (xEventGroup == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = uxBitsToWaitFor & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (uxBitsToWaitFor == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _2 = xTaskGetSchedulerState (); if (_2 != 0) goto ; [INV] else goto ; [INV] : if (xTicksToWait == 0) goto ; [INV] else goto ; [INV] : iftmp.1 = 1; goto ; [INV] : iftmp.1 = 0; : if (iftmp.1 == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : vTaskSuspendAll (); uxCurrentEventBits = pxEventBits->uxEventBits; xWaitConditionMet = prvTestWaitCondition (uxCurrentEventBits, uxBitsToWaitFor, xWaitForAllBits); if (xWaitConditionMet != 0) goto ; [INV] else goto ; [INV] : uxReturn = uxCurrentEventBits; xTicksToWait = 0; if (xClearOnExit != 0) goto ; [INV] else goto ; [INV] : _3 = pxEventBits->uxEventBits; _4 = ~uxBitsToWaitFor; _5 = _3 & _4; pxEventBits->uxEventBits = _5; goto ; [INV] : if (xTicksToWait == 0) goto ; [INV] else goto ; [INV] : uxReturn = uxCurrentEventBits; xTimeoutOccurred = 1; goto ; [INV] : if (xClearOnExit != 0) goto ; [INV] else goto ; [INV] : uxControlBits = uxControlBits | 16777216; : if (xWaitForAllBits != 0) goto ; [INV] else goto ; [INV] : uxControlBits = uxControlBits | 67108864; : _6 = &pxEventBits->xTasksWaitingForBits; _7 = uxBitsToWaitFor | uxControlBits; vTaskPlaceOnUnorderedEventList (_6, _7, xTicksToWait); uxReturn = 0; : xAlreadyYielded = xTaskResumeAll (); if (xTicksToWait != 0) goto ; [INV] else goto ; [INV] : if (xAlreadyYielded == 0) goto ; [INV] else goto ; [INV] : _8 = 3758157060B; *_8 = 268435456; __asm__ __volatile__("dsb" : : : "memory"); __asm__ __volatile__("isb"); : uxReturn = uxTaskResetEventItemValue (); _9 = uxReturn & 33554432; if (_9 == 0) goto ; [INV] else goto ; [INV] : vPortEnterCritical (); uxReturn = pxEventBits->uxEventBits; _10 = prvTestWaitCondition (uxReturn, uxBitsToWaitFor, xWaitForAllBits); if (_10 != 0) goto ; [INV] else goto ; [INV] : if (xClearOnExit != 0) goto ; [INV] else goto ; [INV] : _11 = pxEventBits->uxEventBits; _12 = ~uxBitsToWaitFor; _13 = _11 & _12; pxEventBits->uxEventBits = _13; : xTimeoutOccurred = 1; vPortExitCritical (); : uxReturn = uxReturn & 16777215; : D.6512 = uxReturn; : : return D.6512; } xEventGroupSync (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait) { BaseType_t xTimeoutOccurred; BaseType_t xAlreadyYielded; struct EventGroup_t * pxEventBits; EventBits_t uxReturn; EventBits_t uxOriginalBitValue; EventBits_t D.6468; int iftmp.0; : pxEventBits = xEventGroup; xTimeoutOccurred = 0; _1 = uxBitsToWaitFor & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (uxBitsToWaitFor == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _2 = xTaskGetSchedulerState (); if (_2 != 0) goto ; [INV] else goto ; [INV] : if (xTicksToWait == 0) goto ; [INV] else goto ; [INV] : iftmp.0 = 1; goto ; [INV] : iftmp.0 = 0; : if (iftmp.0 == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : vTaskSuspendAll (); uxOriginalBitValue = pxEventBits->uxEventBits; xEventGroupSetBits (xEventGroup, uxBitsToSet); _3 = uxOriginalBitValue | uxBitsToSet; _4 = uxBitsToWaitFor & _3; if (uxBitsToWaitFor == _4) goto ; [INV] else goto ; [INV] : uxReturn = uxOriginalBitValue | uxBitsToSet; _5 = pxEventBits->uxEventBits; _6 = ~uxBitsToWaitFor; _7 = _5 & _6; pxEventBits->uxEventBits = _7; xTicksToWait = 0; goto ; [INV] : if (xTicksToWait != 0) goto ; [INV] else goto ; [INV] : _8 = &pxEventBits->xTasksWaitingForBits; _9 = uxBitsToWaitFor | 83886080; vTaskPlaceOnUnorderedEventList (_8, _9, xTicksToWait); uxReturn = 0; goto ; [INV] : uxReturn = pxEventBits->uxEventBits; xTimeoutOccurred = 1; : xAlreadyYielded = xTaskResumeAll (); if (xTicksToWait != 0) goto ; [INV] else goto ; [INV] : if (xAlreadyYielded == 0) goto ; [INV] else goto ; [INV] : _10 = 3758157060B; *_10 = 268435456; __asm__ __volatile__("dsb" : : : "memory"); __asm__ __volatile__("isb"); : uxReturn = uxTaskResetEventItemValue (); _11 = uxReturn & 33554432; if (_11 == 0) goto ; [INV] else goto ; [INV] : vPortEnterCritical (); uxReturn = pxEventBits->uxEventBits; _12 = uxReturn & uxBitsToWaitFor; if (uxBitsToWaitFor == _12) goto ; [INV] else goto ; [INV] : _13 = pxEventBits->uxEventBits; _14 = ~uxBitsToWaitFor; _15 = _13 & _14; pxEventBits->uxEventBits = _15; : vPortExitCritical (); xTimeoutOccurred = 1; : uxReturn = uxReturn & 16777215; : D.6468 = uxReturn; : : return D.6468; } xEventGroupCreate () { struct EventGroup_t * pxEventBits; struct EventGroupDef_t * D.6438; : pxEventBits = pvPortMalloc (28); if (pxEventBits != 0B) goto ; [INV] else goto ; [INV] : pxEventBits->uxEventBits = 0; _1 = &pxEventBits->xTasksWaitingForBits; vListInitialise (_1); : D.6438 = pxEventBits; : : return D.6438; } __attribute__((always_inline)) vPortSetBASEPRI (uint32_t ulNewMaskValue) { : __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue : "memory"); return; } __attribute__((always_inline)) ulPortRaiseBASEPRI () { uint32_t ulNewBASEPRI; uint32_t ulOriginalBASEPRI; uint32_t D.6524; : __asm__ __volatile__(" mrs %0, basepri mov %1, %2 msr basepri, %1 isb dsb " : "=r" ulOriginalBASEPRI, "=r" ulNewBASEPRI : "i" 16 : "memory"); D.6524 = ulOriginalBASEPRI; : : return D.6524; } __attribute__((always_inline)) vPortRaiseBASEPRI () { uint32_t ulNewBASEPRI; : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI : "i" 16 : "memory"); return; }