vEventGroupSetNumber (void * xEventGroup, UBaseType_t uxEventGroupNumber) { : MEM[(struct EventGroup_t *)xEventGroup_2(D)].uxEventGroupNumber = uxEventGroupNumber_3(D); return; } uxEventGroupGetNumber (void * xEventGroup) { const struct EventGroup_t * pxEventBits; UBaseType_t xReturn; UBaseType_t D.6567; UBaseType_t _7; : pxEventBits_3 = xEventGroup_2(D); if (xEventGroup_2(D) == 0B) goto ; [INV] else goto ; [INV] : xReturn_6 = 0; goto ; [INV] : xReturn_5 = pxEventBits_3->uxEventGroupNumber; : # xReturn_1 = PHI _7 = xReturn_1; : : return _7; } xEventGroupSetBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, BaseType_t * pxHigherPriorityTaskWoken) { BaseType_t xReturn; BaseType_t D.6562; BaseType_t _7; : xReturn_6 = xTimerPendFunctionCallFromISR (vEventGroupSetBitsCallback, xEventGroup_2(D), uxBitsToSet_3(D), pxHigherPriorityTaskWoken_4(D)); _7 = xReturn_6; : : return _7; } prvTestWaitCondition (const EventBits_t uxCurrentEventBits, const EventBits_t uxBitsToWaitFor, const BaseType_t xWaitForAllBits) { BaseType_t xWaitConditionMet; BaseType_t D.6560; long unsigned int _1; long unsigned int _2; BaseType_t _10; : xWaitConditionMet_4 = 0; if (xWaitForAllBits_5(D) == 0) goto ; [INV] else goto ; [INV] : _1 = uxCurrentEventBits_6(D) & uxBitsToWaitFor_7(D); if (_1 != 0) goto ; [INV] else goto ; [INV] : xWaitConditionMet_9 = 1; goto ; [INV] : _2 = uxCurrentEventBits_6(D) & uxBitsToWaitFor_7(D); if (uxBitsToWaitFor_7(D) == _2) goto ; [INV] else goto ; [INV] : xWaitConditionMet_8 = 1; : # xWaitConditionMet_3 = PHI _10 = xWaitConditionMet_3; : : return _10; } vEventGroupClearBitsCallback (void * pvEventGroup, const uint32_t ulBitsToClear) { : xEventGroupClearBits (pvEventGroup_2(D), ulBitsToClear_3(D)); return; } vEventGroupSetBitsCallback (void * pvEventGroup, const uint32_t ulBitsToSet) { : xEventGroupSetBits (pvEventGroup_2(D), ulBitsToSet_3(D)); return; } vEventGroupDelete (struct EventGroupDef_t * xEventGroup) { uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; const struct List_t * pxTasksWaitingForBits; struct EventGroup_t * pxEventBits; struct xLIST_ITEM * _1; const struct MiniListItem_t * _2; struct xLIST_ITEM * _3; long unsigned int _4; : if (xEventGroup_6(D) == 0B) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory"); : : goto ; [INV] : pxEventBits_7 = xEventGroup_6(D); pxTasksWaitingForBits_8 = &pxEventBits_7->xTasksWaitingForBits; vTaskSuspendAll (); goto ; [INV] : _1 = pxTasksWaitingForBits_8->xListEnd.pxNext; _2 = &pxTasksWaitingForBits_8->xListEnd; if (_1 == _2) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory"); : : goto ; [INV] : _3 = pxTasksWaitingForBits_8->xListEnd.pxNext; vTaskRemoveFromUnorderedEventList (_3, 33554432); : _4 ={v} pxTasksWaitingForBits_8->uxNumberOfItems; if (_4 != 0) goto ; [INV] else goto ; [INV] : vPortFree (pxEventBits_7); xTaskResumeAll (); return; } xEventGroupSetBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet) { uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; 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.6545; long unsigned int _1; long unsigned int _2; long unsigned int _3; long unsigned int _4; long unsigned int _5; long unsigned int _6; long unsigned int _7; long unsigned int _8; long unsigned int _9; long unsigned int _10; long unsigned int _11; long unsigned int _12; long unsigned int _13; long unsigned int _14; EventBits_t _35; : uxBitsToClear_22 = 0; pxEventBits_24 = xEventGroup_23(D); xMatchFound_25 = 0; if (xEventGroup_23(D) == 0B) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_46 : "i" 16 : "memory"); : : goto ; [INV] : _1 = uxBitsToSet_26(D) & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_47 : "i" 16 : "memory"); : : goto ; [INV] : pxList_27 = &pxEventBits_24->xTasksWaitingForBits; pxListEnd_28 = &pxList_27->xListEnd; vTaskSuspendAll (); pxListItem_31 = pxList_27->xListEnd.pxNext; _2 = pxEventBits_24->uxEventBits; _3 = uxBitsToSet_26(D) | _2; pxEventBits_24->uxEventBits = _3; goto ; [INV] : pxNext_36 = pxListItem_15->pxNext; uxBitsWaitedFor_37 = pxListItem_15->xItemValue; xMatchFound_38 = 0; uxControlBits_39 = uxBitsWaitedFor_37 & 4278190080; uxBitsWaitedFor_40 = uxBitsWaitedFor_37 & 16777215; _4 = uxControlBits_39 & 67108864; if (_4 == 0) goto ; [INV] else goto ; [INV] : _5 = pxEventBits_24->uxEventBits; _6 = uxBitsWaitedFor_40 & _5; if (_6 != 0) goto ; [INV] else goto ; [INV] : xMatchFound_42 = 1; goto ; [INV] : _7 = pxEventBits_24->uxEventBits; _8 = uxBitsWaitedFor_40 & _7; if (uxBitsWaitedFor_40 == _8) goto ; [INV] else goto ; [INV] : xMatchFound_41 = 1; : # xMatchFound_19 = PHI if (xMatchFound_19 != 0) goto ; [INV] else goto ; [INV] : _9 = uxControlBits_39 & 16777216; if (_9 != 0) goto ; [INV] else goto ; [INV] : uxBitsToClear_43 = uxBitsToClear_18 | uxBitsWaitedFor_40; : # uxBitsToClear_16 = PHI _10 = pxEventBits_24->uxEventBits; _11 = _10 | 33554432; vTaskRemoveFromUnorderedEventList (pxListItem_15, _11); : # uxBitsToClear_17 = PHI pxListItem_45 = pxNext_36; : # pxListItem_15 = PHI # uxBitsToClear_18 = PHI if (pxListItem_15 != pxListEnd_28) goto ; [INV] else goto ; [INV] : _12 = pxEventBits_24->uxEventBits; _13 = ~uxBitsToClear_18; _14 = _12 & _13; pxEventBits_24->uxEventBits = _14; xTaskResumeAll (); _35 = pxEventBits_24->uxEventBits; : : return _35; } xEventGroupGetBitsFromISR (struct EventGroupDef_t * xEventGroup) { uint32_t D.6592; uint32_t ulOriginalBASEPRI; uint32_t ulNewBASEPRI; uint32_t D.6591; uint32_t ulNewMaskValue; EventBits_t uxReturn; const struct EventGroup_t * const pxEventBits; UBaseType_t uxSavedInterruptStatus; EventBits_t D.6523; EventBits_t _6; long unsigned int _10; : pxEventBits_2 = xEventGroup_1(D); __asm__ __volatile__(" mrs %0, basepri mov %1, %2 msr basepri, %1 isb dsb " : "=r" ulOriginalBASEPRI_8, "=r" ulNewBASEPRI_9 : "i" 16 : "memory"); _10 = ulOriginalBASEPRI_8; : : _12 = _10; : uxSavedInterruptStatus_4 = _12; uxReturn_5 = pxEventBits_2->uxEventBits; ulNewMaskValue_7 = uxSavedInterruptStatus_4; __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_7 : "memory"); : _6 = uxReturn_5; : : return _6; } xEventGroupClearBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear) { BaseType_t xReturn; BaseType_t D.6521; BaseType_t _6; : xReturn_5 = xTimerPendFunctionCallFromISR (vEventGroupClearBitsCallback, xEventGroup_2(D), uxBitsToClear_3(D), 0B); _6 = xReturn_5; : : return _6; } xEventGroupClearBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear) { uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; EventBits_t uxReturn; struct EventGroup_t * pxEventBits; EventBits_t D.6519; long unsigned int _1; long unsigned int _2; long unsigned int _3; long unsigned int _4; EventBits_t _13; : pxEventBits_6 = xEventGroup_5(D); if (xEventGroup_5(D) == 0B) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory"); : : goto ; [INV] : _1 = uxBitsToClear_7(D) & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory"); : : goto ; [INV] : vPortEnterCritical (); uxReturn_10 = pxEventBits_6->uxEventBits; _2 = pxEventBits_6->uxEventBits; _3 = ~uxBitsToClear_7(D); _4 = _2 & _3; pxEventBits_6->uxEventBits = _4; vPortExitCritical (); _13 = uxReturn_10; : : return _13; } xEventGroupWaitBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait) { uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; 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.6513; int iftmp.1; long unsigned int _1; long int _2; long unsigned int _3; long unsigned int _4; long unsigned int _5; struct List_t * _6; long unsigned int _7; volatile uint32_t * _8; long unsigned int _9; long int _10; long unsigned int _11; long unsigned int _12; long unsigned int _13; int iftmp.1_20; int iftmp.1_34; int iftmp.1_35; EventBits_t _65; : pxEventBits_27 = xEventGroup_26(D); uxControlBits_28 = 0; xTimeoutOccurred_29 = 0; if (xEventGroup_26(D) == 0B) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_66 : "i" 16 : "memory"); : : goto ; [INV] : _1 = uxBitsToWaitFor_30(D) & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_67 : "i" 16 : "memory"); : : goto ; [INV] : if (uxBitsToWaitFor_30(D) == 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_68 : "i" 16 : "memory"); : : goto ; [INV] : _2 = xTaskGetSchedulerState (); if (_2 != 0) goto ; [INV] else goto ; [INV] : if (xTicksToWait_33(D) == 0) goto ; [INV] else goto ; [INV] : iftmp.1_35 = 1; goto ; [INV] : iftmp.1_34 = 0; : # iftmp.1_20 = PHI if (iftmp.1_20 == 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_69 : "i" 16 : "memory"); : : goto ; [INV] : vTaskSuspendAll (); uxCurrentEventBits_37 = pxEventBits_27->uxEventBits; xWaitConditionMet_40 = prvTestWaitCondition (uxCurrentEventBits_37, uxBitsToWaitFor_30(D), xWaitForAllBits_38(D)); if (xWaitConditionMet_40 != 0) goto ; [INV] else goto ; [INV] : uxReturn_48 = uxCurrentEventBits_37; xTicksToWait_49 = 0; if (xClearOnExit_41(D) != 0) goto ; [INV] else goto ; [INV] : _3 = pxEventBits_27->uxEventBits; _4 = ~uxBitsToWaitFor_30(D); _5 = _3 & _4; pxEventBits_27->uxEventBits = _5; goto ; [INV] : if (xTicksToWait_33(D) == 0) goto ; [INV] else goto ; [INV] : uxReturn_46 = uxCurrentEventBits_37; xTimeoutOccurred_47 = 1; goto ; [INV] : if (xClearOnExit_41(D) != 0) goto ; [INV] else goto ; [INV] : uxControlBits_42 = uxControlBits_28 | 16777216; : # uxControlBits_18 = PHI if (xWaitForAllBits_38(D) != 0) goto ; [INV] else goto ; [INV] : uxControlBits_43 = uxControlBits_18 | 67108864; : # uxControlBits_19 = PHI _6 = &pxEventBits_27->xTasksWaitingForBits; _7 = uxBitsToWaitFor_30(D) | uxControlBits_19; vTaskPlaceOnUnorderedEventList (_6, _7, xTicksToWait_33(D)); uxReturn_45 = 0; : # xTicksToWait_14 = PHI # uxReturn_15 = PHI xAlreadyYielded_52 = xTaskResumeAll (); if (xTicksToWait_14 != 0) goto ; [INV] else goto ; [INV] : if (xAlreadyYielded_52 == 0) goto ; [INV] else goto ; [INV] : _8 = 3758157060B; *_8 ={v} 268435456; __asm__ __volatile__("dsb" : : : "memory"); __asm__ __volatile__("isb"); : uxReturn_57 = uxTaskResetEventItemValue (); _9 = uxReturn_57 & 33554432; if (_9 == 0) goto ; [INV] else goto ; [INV] : vPortEnterCritical (); uxReturn_59 = pxEventBits_27->uxEventBits; _10 = prvTestWaitCondition (uxReturn_59, uxBitsToWaitFor_30(D), xWaitForAllBits_38(D)); if (_10 != 0) goto ; [INV] else goto ; [INV] : if (xClearOnExit_41(D) != 0) goto ; [INV] else goto ; [INV] : _11 = pxEventBits_27->uxEventBits; _12 = ~uxBitsToWaitFor_30(D); _13 = _11 & _12; pxEventBits_27->uxEventBits = _13; : xTimeoutOccurred_62 = 1; vPortExitCritical (); : # uxReturn_16 = PHI uxReturn_64 = uxReturn_16 & 16777215; : # uxReturn_17 = PHI _65 = uxReturn_17; : : return _65; } xEventGroupSync (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait) { uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; uint32_t ulNewBASEPRI; BaseType_t xTimeoutOccurred; BaseType_t xAlreadyYielded; struct EventGroup_t * pxEventBits; EventBits_t uxReturn; EventBits_t uxOriginalBitValue; EventBits_t D.6469; int iftmp.0; long unsigned int _1; long int _2; long unsigned int _3; long unsigned int _4; long unsigned int _5; long unsigned int _6; long unsigned int _7; struct List_t * _8; long unsigned int _9; volatile uint32_t * _10; long unsigned int _11; long unsigned int _12; long unsigned int _13; long unsigned int _14; long unsigned int _15; int iftmp.0_20; int iftmp.0_33; int iftmp.0_34; EventBits_t _59; : pxEventBits_27 = xEventGroup_26(D); xTimeoutOccurred_28 = 0; _1 = uxBitsToWaitFor_29(D) & 4278190080; if (_1 != 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_60 : "i" 16 : "memory"); : : goto ; [INV] : if (uxBitsToWaitFor_29(D) == 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_61 : "i" 16 : "memory"); : : goto ; [INV] : _2 = xTaskGetSchedulerState (); if (_2 != 0) goto ; [INV] else goto ; [INV] : if (xTicksToWait_32(D) == 0) goto ; [INV] else goto ; [INV] : iftmp.0_34 = 1; goto ; [INV] : iftmp.0_33 = 0; : # iftmp.0_20 = PHI if (iftmp.0_20 == 0) goto ; [INV] else goto ; [INV] : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI_62 : "i" 16 : "memory"); : : goto ; [INV] : vTaskSuspendAll (); uxOriginalBitValue_36 = pxEventBits_27->uxEventBits; xEventGroupSetBits (xEventGroup_26(D), uxBitsToSet_37(D)); _3 = uxOriginalBitValue_36 | uxBitsToSet_37(D); _4 = uxBitsToWaitFor_29(D) & _3; if (uxBitsToWaitFor_29(D) == _4) goto ; [INV] else goto ; [INV] : uxReturn_43 = uxOriginalBitValue_36 | uxBitsToSet_37(D); _5 = pxEventBits_27->uxEventBits; _6 = ~uxBitsToWaitFor_29(D); _7 = _5 & _6; pxEventBits_27->uxEventBits = _7; xTicksToWait_45 = 0; goto ; [INV] : if (xTicksToWait_32(D) != 0) goto ; [INV] else goto ; [INV] : _8 = &pxEventBits_27->xTasksWaitingForBits; _9 = uxBitsToWaitFor_29(D) | 83886080; vTaskPlaceOnUnorderedEventList (_8, _9, xTicksToWait_32(D)); uxReturn_42 = 0; goto ; [INV] : uxReturn_39 = pxEventBits_27->uxEventBits; xTimeoutOccurred_40 = 1; : # xTicksToWait_16 = PHI # uxReturn_17 = PHI xAlreadyYielded_47 = xTaskResumeAll (); if (xTicksToWait_16 != 0) goto ; [INV] else goto ; [INV] : if (xAlreadyYielded_47 == 0) goto ; [INV] else goto ; [INV] : _10 = 3758157060B; *_10 ={v} 268435456; __asm__ __volatile__("dsb" : : : "memory"); __asm__ __volatile__("isb"); : uxReturn_52 = uxTaskResetEventItemValue (); _11 = uxReturn_52 & 33554432; if (_11 == 0) goto ; [INV] else goto ; [INV] : vPortEnterCritical (); uxReturn_54 = pxEventBits_27->uxEventBits; _12 = uxReturn_54 & uxBitsToWaitFor_29(D); if (uxBitsToWaitFor_29(D) == _12) goto ; [INV] else goto ; [INV] : _13 = pxEventBits_27->uxEventBits; _14 = ~uxBitsToWaitFor_29(D); _15 = _13 & _14; pxEventBits_27->uxEventBits = _15; : vPortExitCritical (); xTimeoutOccurred_57 = 1; : # uxReturn_18 = PHI uxReturn_58 = uxReturn_18 & 16777215; : # uxReturn_19 = PHI _59 = uxReturn_19; : : return _59; } xEventGroupCreate () { struct EventGroup_t * pxEventBits; struct EventGroupDef_t * D.6439; struct List_t * _1; struct EventGroupDef_t * _8; : pxEventBits_5 = pvPortMalloc (28); if (pxEventBits_5 != 0B) goto ; [INV] else goto ; [INV] : pxEventBits_5->uxEventBits = 0; _1 = &pxEventBits_5->xTasksWaitingForBits; vListInitialise (_1); : _8 = pxEventBits_5; : : return _8; }