Marking local functions: vPortSetBASEPRI ulPortRaiseBASEPRI vPortRaiseBASEPRI 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: xStreamBufferReceiveCompletedFromISR/20 xStreamBufferSendCompletedFromISR/19 xStreamBufferReceiveFromISR/15 xStreamBufferSendFromISR/11 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: xStreamBufferReceive/13 xStreamBufferSend/10 xStreamBufferSend/10 xStreamBufferReset/6 Calls: vPortEnterCritical/31 (vPortEnterCritical) @06cc30e0 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: Called by: xStreamBufferReceive/13 xStreamBufferSend/10 xStreamBufferReset/6 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 vPortRaiseBASEPRI/1 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: prvReadMessageFromBuffer/16 prvReadMessageFromBuffer/16 xStreamBufferNextMessageLengthBytes/14 Calls: memcpy/42 memcpy/42 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 memcpy/42 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 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: vPortSetBASEPRI/3 xTaskGenericNotifyFromISR/41 ulPortRaiseBASEPRI/2 vPortRaiseBASEPRI/1 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: vPortSetBASEPRI/3 xTaskGenericNotifyFromISR/41 ulPortRaiseBASEPRI/2 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 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: vPortRaiseBASEPRI/1 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: vPortSetBASEPRI/3 xTaskGenericNotifyFromISR/41 ulPortRaiseBASEPRI/2 prvReadMessageFromBuffer/16 prvBytesInBuffer/23 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 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: vPortRaiseBASEPRI/1 prvReadBytesFromBuffer/22 prvBytesInBuffer/23 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 xTaskGenericNotifyStateClear/34 prvBytesInBuffer/23 vPortEnterCritical/31 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 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: vPortSetBASEPRI/3 xTaskGenericNotifyFromISR/41 ulPortRaiseBASEPRI/2 prvBytesInBuffer/23 prvWriteMessageToBuffer/12 xStreamBufferSpacesAvailable/8 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 xTaskGenericNotifyStateClear/34 xStreamBufferSpacesAvailable/8 vPortEnterCritical/31 vTaskSetTimeOutState/33 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 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: xStreamBufferIsFull/18 xStreamBufferSendFromISR/11 xStreamBufferSend/10 xStreamBufferSend/10 Calls: vPortRaiseBASEPRI/1 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: vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 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 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 vPortSetBASEPRI/3 (vPortSetBASEPRI) @06bf41c0 Type: function definition analyzed Visibility: no_reorder prevailing_def_ironly References: Referring: Availability: local Function flags: body local Called by: xStreamBufferReceiveCompletedFromISR/20 xStreamBufferSendCompletedFromISR/19 xStreamBufferReceiveFromISR/15 xStreamBufferSendFromISR/11 Calls: ulPortRaiseBASEPRI/2 (ulPortRaiseBASEPRI) @06bedee0 Type: function definition analyzed Visibility: no_reorder prevailing_def_ironly References: Referring: Availability: local Function flags: body local Called by: xStreamBufferReceiveCompletedFromISR/20 xStreamBufferSendCompletedFromISR/19 xStreamBufferReceiveFromISR/15 xStreamBufferSendFromISR/11 Calls: vPortRaiseBASEPRI/1 (vPortRaiseBASEPRI) @06bedb60 Type: function definition analyzed Visibility: no_reorder prevailing_def_ironly References: Referring: Availability: local Function flags: body local Called by: prvInitialiseNewStreamBuffer/24 prvReadBytesFromBuffer/22 prvReadBytesFromBuffer/22 prvReadBytesFromBuffer/22 prvWriteBytesToBuffer/21 prvWriteBytesToBuffer/21 prvWriteBytesToBuffer/21 xStreamBufferReceiveCompletedFromISR/20 xStreamBufferSendCompletedFromISR/19 xStreamBufferIsFull/18 xStreamBufferIsEmpty/17 xStreamBufferReceiveFromISR/15 xStreamBufferReceiveFromISR/15 xStreamBufferNextMessageLengthBytes/14 xStreamBufferNextMessageLengthBytes/14 xStreamBufferReceive/13 xStreamBufferReceive/13 xStreamBufferReceive/13 xStreamBufferSendFromISR/11 xStreamBufferSendFromISR/11 xStreamBufferSend/10 xStreamBufferSend/10 xStreamBufferSend/10 xStreamBufferSend/10 xStreamBufferBytesAvailable/9 xStreamBufferSpacesAvailable/8 xStreamBufferSetTriggerLevel/7 xStreamBufferReset/6 vStreamBufferDelete/5 xStreamBufferGenericCreate/4 xStreamBufferGenericCreate/4 xStreamBufferGenericCreate/4 Calls: ucStreamBufferGetStreamBufferType (struct StreamBufferDef_t * xStreamBuffer) { uint8_t D.6587; : _1 = xStreamBuffer->ucFlags; D.6587 = _1 & 1; : : return D.6587; } vStreamBufferSetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer, UBaseType_t uxStreamBufferNumber) { : xStreamBuffer->uxStreamBufferNumber = uxStreamBufferNumber; return; } uxStreamBufferGetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer) { UBaseType_t D.6585; : D.6585 = xStreamBuffer->uxStreamBufferNumber; : : return D.6585; } prvInitialiseNewStreamBuffer (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags) { const BaseType_t xWriteValue; : xWriteValue = 85; _1 = memset (pucBuffer, xWriteValue, xBufferSizeBytes); if (pucBuffer != _1) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : memset (pxStreamBuffer, 0, 36); pxStreamBuffer->pucBuffer = pucBuffer; pxStreamBuffer->xLength = xBufferSizeBytes; pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes; pxStreamBuffer->ucFlags = ucFlags; return; } prvBytesInBuffer (const struct StreamBuffer_t * const pxStreamBuffer) { size_t xCount; size_t D.6581; unsigned int D.6577; : _1 = pxStreamBuffer->xLength; _2 = pxStreamBuffer->xHead; xCount = _1 + _2; D.6577 = pxStreamBuffer->xTail; xCount = xCount - D.6577; _3 = pxStreamBuffer->xLength; if (xCount >= _3) goto ; [INV] else goto ; [INV] : _4 = pxStreamBuffer->xLength; xCount = xCount - _4; : D.6581 = xCount; : : return D.6581; } prvReadBytesFromBuffer (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail) { size_t xFirstLength; size_t D.6575; : if (xCount == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->xLength; _2 = _1 - xTail; xFirstLength = MIN_EXPR ; if (xFirstLength > xCount) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _3 = xTail + xFirstLength; _4 = pxStreamBuffer->xLength; if (_3 > _4) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _5 = pxStreamBuffer->pucBuffer; _6 = _5 + xTail; memcpy (pucData, _6, xFirstLength); if (xCount > xFirstLength) goto ; [INV] else goto ; [INV] : _7 = pucData + xFirstLength; _8 = pxStreamBuffer->pucBuffer; _9 = xCount - xFirstLength; memcpy (_7, _8, _9); : xTail = xTail + xCount; _10 = pxStreamBuffer->xLength; if (xTail >= _10) goto ; [INV] else goto ; [INV] : _11 = pxStreamBuffer->xLength; xTail = xTail - _11; : D.6575 = xTail; : : return D.6575; } prvWriteBytesToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead) { size_t xFirstLength; size_t D.6562; : if (xCount == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->xLength; _2 = _1 - xHead; xFirstLength = MIN_EXPR ; _3 = xHead + xFirstLength; _4 = pxStreamBuffer->xLength; if (_3 > _4) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _5 = pxStreamBuffer->pucBuffer; _6 = _5 + xHead; memcpy (_6, pucData, xFirstLength); if (xCount > xFirstLength) goto ; [INV] else goto ; [INV] : _7 = xCount - xFirstLength; _8 = pxStreamBuffer->xLength; if (_7 > _8) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _9 = pxStreamBuffer->pucBuffer; _10 = pucData + xFirstLength; _11 = xCount - xFirstLength; memcpy (_9, _10, _11); : xHead = xHead + xCount; _12 = pxStreamBuffer->xLength; if (xHead >= _12) goto ; [INV] else goto ; [INV] : _13 = pxStreamBuffer->xLength; xHead = xHead - _13; : D.6562 = xHead; : : return D.6562; } xStreamBufferReceiveCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken) { UBaseType_t uxSavedInterruptStatus; BaseType_t xReturn; struct StreamBuffer_t * const pxStreamBuffer; BaseType_t D.6548; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : uxSavedInterruptStatus = ulPortRaiseBASEPRI (); _1 = pxStreamBuffer->xTaskWaitingToSend; if (_1 != 0B) goto ; [INV] else goto ; [INV] : _2 = pxStreamBuffer->xTaskWaitingToSend; xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken); pxStreamBuffer->xTaskWaitingToSend = 0B; xReturn = 1; goto ; [INV] : xReturn = 0; : vPortSetBASEPRI (uxSavedInterruptStatus); D.6548 = xReturn; : : return D.6548; } xStreamBufferSendCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken) { UBaseType_t uxSavedInterruptStatus; BaseType_t xReturn; struct StreamBuffer_t * const pxStreamBuffer; BaseType_t D.6541; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : uxSavedInterruptStatus = ulPortRaiseBASEPRI (); _1 = pxStreamBuffer->xTaskWaitingToReceive; if (_1 != 0B) goto ; [INV] else goto ; [INV] : _2 = pxStreamBuffer->xTaskWaitingToReceive; xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken); pxStreamBuffer->xTaskWaitingToReceive = 0B; xReturn = 1; goto ; [INV] : xReturn = 0; : vPortSetBASEPRI (uxSavedInterruptStatus); D.6541 = xReturn; : : return D.6541; } xStreamBufferIsFull (struct StreamBufferDef_t * xStreamBuffer) { const struct StreamBuffer_t * const pxStreamBuffer; size_t xBytesToStoreMessageLength; BaseType_t xReturn; BaseType_t D.6534; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : xBytesToStoreMessageLength = 4; goto ; [INV] : xBytesToStoreMessageLength = 0; : _4 = xStreamBufferSpacesAvailable (xStreamBuffer); if (xBytesToStoreMessageLength >= _4) goto ; [INV] else goto ; [INV] : xReturn = 1; goto ; [INV] : xReturn = 0; : D.6534 = xReturn; : : return D.6534; } xStreamBufferIsEmpty (struct StreamBufferDef_t * xStreamBuffer) { size_t xTail; BaseType_t xReturn; const struct StreamBuffer_t * const pxStreamBuffer; BaseType_t D.6524; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : xTail = pxStreamBuffer->xTail; _1 = pxStreamBuffer->xHead; if (xTail == _1) goto ; [INV] else goto ; [INV] : xReturn = 1; goto ; [INV] : xReturn = 0; : D.6524 = xReturn; : : return D.6524; } 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; : xNextTail = pxStreamBuffer->xTail; _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : xNextTail = prvReadBytesFromBuffer (pxStreamBuffer, &xTempNextMessageLength, 4, xNextTail); xNextMessageLength = xTempNextMessageLength; xBytesAvailable = xBytesAvailable + 4294967292; if (xNextMessageLength > xBufferLengthBytes) goto ; [INV] else goto ; [INV] : xNextMessageLength = 0; goto ; [INV] : xNextMessageLength = xBufferLengthBytes; : xCount = MIN_EXPR ; if (xCount != 0) goto ; [INV] else goto ; [INV] : _4 = prvReadBytesFromBuffer (pxStreamBuffer, pvRxData, xCount, xNextTail); pxStreamBuffer->xTail = _4; : D.6516 = xCount; xTempNextMessageLength = {CLOBBER}; : : return D.6516; } xStreamBufferReceiveFromISR (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken) { UBaseType_t uxSavedInterruptStatus; size_t xBytesToStoreMessageLength; size_t xBytesAvailable; size_t xReceivedLength; struct StreamBuffer_t * const pxStreamBuffer; size_t D.6506; : pxStreamBuffer = xStreamBuffer; xReceivedLength = 0; if (pvRxData == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : xBytesToStoreMessageLength = 4; goto ; [INV] : xBytesToStoreMessageLength = 0; : xBytesAvailable = prvBytesInBuffer (pxStreamBuffer); if (xBytesAvailable > xBytesToStoreMessageLength) goto ; [INV] else goto ; [INV] : xReceivedLength = prvReadMessageFromBuffer (pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable); if (xReceivedLength != 0) goto ; [INV] else goto ; [INV] : uxSavedInterruptStatus = ulPortRaiseBASEPRI (); _4 = pxStreamBuffer->xTaskWaitingToSend; if (_4 != 0B) goto ; [INV] else goto ; [INV] : _5 = pxStreamBuffer->xTaskWaitingToSend; xTaskGenericNotifyFromISR (_5, 0, 0, 0, 0B, pxHigherPriorityTaskWoken); pxStreamBuffer->xTaskWaitingToSend = 0B; : vPortSetBASEPRI (uxSavedInterruptStatus); : D.6506 = xReceivedLength; : : return D.6506; } xStreamBufferNextMessageLengthBytes (struct StreamBufferDef_t * xStreamBuffer) { size_t xTempReturn; size_t xBytesAvailable; size_t xReturn; struct StreamBuffer_t * const pxStreamBuffer; size_t D.6488; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : xBytesAvailable = prvBytesInBuffer (pxStreamBuffer); if (xBytesAvailable > 4) goto ; [INV] else goto ; [INV] : _4 = pxStreamBuffer->xTail; prvReadBytesFromBuffer (pxStreamBuffer, &xTempReturn, 4, _4); xReturn = xTempReturn; goto ; [INV] : if (xBytesAvailable != 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : xReturn = 0; goto ; [INV] : xReturn = 0; : D.6488 = xReturn; xTempReturn = {CLOBBER}; : : return D.6488; } xStreamBufferReceive (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait) { size_t xBytesToStoreMessageLength; size_t xBytesAvailable; size_t xReceivedLength; struct StreamBuffer_t * const pxStreamBuffer; size_t D.6476; : pxStreamBuffer = xStreamBuffer; xReceivedLength = 0; if (pvRxData == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : xBytesToStoreMessageLength = 4; goto ; [INV] : xBytesToStoreMessageLength = 0; : if (xTicksToWait != 0) goto ; [INV] else goto ; [INV] : vPortEnterCritical (); xBytesAvailable = prvBytesInBuffer (pxStreamBuffer); if (xBytesAvailable <= xBytesToStoreMessageLength) goto ; [INV] else goto ; [INV] : xTaskGenericNotifyStateClear (0B, 0); _4 = pxStreamBuffer->xTaskWaitingToReceive; if (_4 != 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _5 = xTaskGetCurrentTaskHandle (); pxStreamBuffer->xTaskWaitingToReceive = _5; : vPortExitCritical (); if (xBytesAvailable <= xBytesToStoreMessageLength) goto ; [INV] else goto ; [INV] : xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait); pxStreamBuffer->xTaskWaitingToReceive = 0B; xBytesAvailable = prvBytesInBuffer (pxStreamBuffer); goto ; [INV] : xBytesAvailable = prvBytesInBuffer (pxStreamBuffer); : if (xBytesAvailable > xBytesToStoreMessageLength) goto ; [INV] else goto ; [INV] : xReceivedLength = prvReadMessageFromBuffer (pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable); if (xReceivedLength != 0) goto ; [INV] else goto ; [INV] : vTaskSuspendAll (); _6 = pxStreamBuffer->xTaskWaitingToSend; if (_6 != 0B) goto ; [INV] else goto ; [INV] : _7 = pxStreamBuffer->xTaskWaitingToSend; xTaskGenericNotify (_7, 0, 0, 0, 0B); pxStreamBuffer->xTaskWaitingToSend = 0B; : xTaskResumeAll (); : D.6476 = xReceivedLength; : : return D.6476; } 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; : xNextHead = pxStreamBuffer->xHead; _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : if (xSpace >= xRequiredSpace) goto ; [INV] else goto ; [INV] : xNextHead = prvWriteBytesToBuffer (pxStreamBuffer, &xDataLengthBytes, 4, xNextHead); goto ; [INV] : xDataLengthBytes = 0; goto ; [INV] : xDataLengthBytes.2_4 = xDataLengthBytes; _5 = MIN_EXPR ; xDataLengthBytes = _5; : xDataLengthBytes.3_6 = xDataLengthBytes; if (xDataLengthBytes.3_6 != 0) goto ; [INV] else goto ; [INV] : xDataLengthBytes.4_7 = xDataLengthBytes; _8 = prvWriteBytesToBuffer (pxStreamBuffer, pvTxData, xDataLengthBytes.4_7, xNextHead); pxStreamBuffer->xHead = _8; : D.6448 = xDataLengthBytes; : : return D.6448; } xStreamBufferSendFromISR (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken) { UBaseType_t uxSavedInterruptStatus; size_t xRequiredSpace; size_t xSpace; size_t xReturn; struct StreamBuffer_t * const pxStreamBuffer; size_t D.6436; : pxStreamBuffer = xStreamBuffer; xRequiredSpace = xDataLengthBytes; if (pvTxData == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 1; if (_3 != 0) goto ; [INV] else goto ; [INV] : xRequiredSpace = xRequiredSpace + 4; : xSpace = xStreamBufferSpacesAvailable (pxStreamBuffer); xReturn = prvWriteMessageToBuffer (pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace); if (xReturn != 0) goto ; [INV] else goto ; [INV] : _4 = prvBytesInBuffer (pxStreamBuffer); _5 = pxStreamBuffer->xTriggerLevelBytes; if (_4 >= _5) goto ; [INV] else goto ; [INV] : uxSavedInterruptStatus = ulPortRaiseBASEPRI (); _6 = pxStreamBuffer->xTaskWaitingToReceive; if (_6 != 0B) goto ; [INV] else goto ; [INV] : _7 = pxStreamBuffer->xTaskWaitingToReceive; xTaskGenericNotifyFromISR (_7, 0, 0, 0, 0B, pxHigherPriorityTaskWoken); pxStreamBuffer->xTaskWaitingToReceive = 0B; : vPortSetBASEPRI (uxSavedInterruptStatus); : D.6436 = xReturn; : : return D.6436; } xStreamBufferSend (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait) { 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; : pxStreamBuffer = xStreamBuffer; xSpace = 0; xRequiredSpace = xDataLengthBytes; xMaxReportedSpace = 0; if (pvTxData == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->xLength; xMaxReportedSpace = _1 + 4294967295; _2 = pxStreamBuffer->ucFlags; _3 = (int) _2; _4 = _3 & 1; if (_4 != 0) goto ; [INV] else goto ; [INV] : xRequiredSpace = xRequiredSpace + 4; if (xRequiredSpace <= xDataLengthBytes) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (xRequiredSpace > xMaxReportedSpace) goto ; [INV] else goto ; [INV] : xTicksToWait = 0; goto ; [INV] : if (xRequiredSpace > xMaxReportedSpace) goto ; [INV] else goto ; [INV] : xRequiredSpace = xMaxReportedSpace; : xTicksToWait.0_5 = xTicksToWait; if (xTicksToWait.0_5 != 0) goto ; [INV] else goto ; [INV] : vTaskSetTimeOutState (&xTimeOut); : vPortEnterCritical (); xSpace = xStreamBufferSpacesAvailable (pxStreamBuffer); if (xSpace < xRequiredSpace) goto ; [INV] else goto ; [INV] : xTaskGenericNotifyStateClear (0B, 0); _6 = pxStreamBuffer->xTaskWaitingToSend; if (_6 != 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _7 = xTaskGetCurrentTaskHandle (); pxStreamBuffer->xTaskWaitingToSend = _7; goto ; [INV] : vPortExitCritical (); goto ; [INV] : vPortExitCritical (); xTicksToWait.1_8 = xTicksToWait; xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait.1_8); pxStreamBuffer->xTaskWaitingToSend = 0B; _9 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait); if (_9 == 0) goto ; [INV] else goto ; [INV] : : if (xSpace == 0) goto ; [INV] else goto ; [INV] : xSpace = xStreamBufferSpacesAvailable (pxStreamBuffer); : xReturn = prvWriteMessageToBuffer (pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace); if (xReturn != 0) goto ; [INV] else goto ; [INV] : _10 = prvBytesInBuffer (pxStreamBuffer); _11 = pxStreamBuffer->xTriggerLevelBytes; if (_10 >= _11) goto ; [INV] else goto ; [INV] : vTaskSuspendAll (); _12 = pxStreamBuffer->xTaskWaitingToReceive; if (_12 != 0B) goto ; [INV] else goto ; [INV] : _13 = pxStreamBuffer->xTaskWaitingToReceive; xTaskGenericNotify (_13, 0, 0, 0, 0B); pxStreamBuffer->xTaskWaitingToReceive = 0B; : xTaskResumeAll (); : D.6418 = xReturn; xTimeOut = {CLOBBER}; : : return D.6418; } xStreamBufferBytesAvailable (struct StreamBufferDef_t * xStreamBuffer) { size_t xReturn; const struct StreamBuffer_t * const pxStreamBuffer; size_t D.6382; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : xReturn = prvBytesInBuffer (pxStreamBuffer); D.6382 = xReturn; : : return D.6382; } xStreamBufferSpacesAvailable (struct StreamBufferDef_t * xStreamBuffer) { size_t xOriginalTail; size_t xSpace; const struct StreamBuffer_t * const pxStreamBuffer; size_t D.6378; unsigned int D.6374; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : xOriginalTail = pxStreamBuffer->xTail; _1 = pxStreamBuffer->xLength; _2 = pxStreamBuffer->xTail; xSpace = _1 + _2; D.6374 = pxStreamBuffer->xHead; xSpace = xSpace - D.6374; _3 = pxStreamBuffer->xTail; if (xOriginalTail != _3) goto ; [INV] else goto ; [INV] : xSpace = xSpace + 4294967295; _4 = pxStreamBuffer->xLength; if (xSpace >= _4) goto ; [INV] else goto ; [INV] : _5 = pxStreamBuffer->xLength; xSpace = xSpace - _5; : D.6378 = xSpace; : : return D.6378; } xStreamBufferSetTriggerLevel (struct StreamBufferDef_t * xStreamBuffer, size_t xTriggerLevel) { BaseType_t xReturn; struct StreamBuffer_t * const pxStreamBuffer; BaseType_t D.6370; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (xTriggerLevel == 0) goto ; [INV] else goto ; [INV] : xTriggerLevel = 1; : _1 = pxStreamBuffer->xLength; if (xTriggerLevel < _1) goto ; [INV] else goto ; [INV] : pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel; xReturn = 1; goto ; [INV] : xReturn = 0; : D.6370 = xReturn; : : return D.6370; } xStreamBufferReset (struct StreamBufferDef_t * xStreamBuffer) { UBaseType_t uxStreamBufferNumber; BaseType_t xReturn; struct StreamBuffer_t * const pxStreamBuffer; BaseType_t D.6361; : pxStreamBuffer = xStreamBuffer; xReturn = 0; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : uxStreamBufferNumber = pxStreamBuffer->uxStreamBufferNumber; vPortEnterCritical (); _1 = pxStreamBuffer->xTaskWaitingToReceive; if (_1 == 0B) goto ; [INV] else goto ; [INV] : _2 = pxStreamBuffer->xTaskWaitingToSend; if (_2 == 0B) goto ; [INV] else goto ; [INV] : _3 = pxStreamBuffer->pucBuffer; _4 = pxStreamBuffer->xLength; _5 = pxStreamBuffer->xTriggerLevelBytes; _6 = pxStreamBuffer->ucFlags; prvInitialiseNewStreamBuffer (pxStreamBuffer, _3, _4, _5, _6); xReturn = 1; pxStreamBuffer->uxStreamBufferNumber = uxStreamBufferNumber; : vPortExitCritical (); D.6361 = xReturn; : : return D.6361; } vStreamBufferDelete (struct StreamBufferDef_t * xStreamBuffer) { struct StreamBuffer_t * pxStreamBuffer; : pxStreamBuffer = xStreamBuffer; if (pxStreamBuffer == 0B) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : _1 = pxStreamBuffer->ucFlags; _2 = (int) _1; _3 = _2 & 2; if (_3 == 0) goto ; [INV] else goto ; [INV] : vPortFree (pxStreamBuffer); goto ; [INV] : memset (pxStreamBuffer, 0, 36); : return; } xStreamBufferGenericCreate (size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer) { uint8_t ucFlags; uint8_t * pucAllocatedMemory; struct StreamBufferDef_t * D.6348; : if (xIsMessageBuffer == 1) goto ; [INV] else goto ; [INV] : ucFlags = 1; if (xBufferSizeBytes <= 4) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : ucFlags = 0; if (xBufferSizeBytes == 0) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (xTriggerLevelBytes > xBufferSizeBytes) goto ; [INV] else goto ; [INV] : vPortRaiseBASEPRI (); : goto ; [INV] : if (xTriggerLevelBytes == 0) goto ; [INV] else goto ; [INV] : xTriggerLevelBytes = 1; : if (xBufferSizeBytes <= 4294967258) goto ; [INV] else goto ; [INV] : xBufferSizeBytes = xBufferSizeBytes + 1; _1 = xBufferSizeBytes + 36; pucAllocatedMemory = pvPortMalloc (_1); goto ; [INV] : pucAllocatedMemory = 0B; : if (pucAllocatedMemory != 0B) goto ; [INV] else goto ; [INV] : _2 = pucAllocatedMemory + 36; prvInitialiseNewStreamBuffer (pucAllocatedMemory, _2, xBufferSizeBytes, xTriggerLevelBytes, ucFlags); : D.6348 = pucAllocatedMemory; : : return D.6348; } __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.6438; : __asm__ __volatile__(" mrs %0, basepri mov %1, %2 msr basepri, %1 isb dsb " : "=r" ulOriginalBASEPRI, "=r" ulNewBASEPRI : "i" 16 : "memory"); D.6438 = ulOriginalBASEPRI; : : return D.6438; } __attribute__((always_inline)) vPortRaiseBASEPRI () { uint32_t ulNewBASEPRI; : __asm__ __volatile__(" mov %0, %1 msr basepri, %0 isb dsb " : "=r" ulNewBASEPRI : "i" 16 : "memory"); return; }