SWCU191 February 2022 CC1311P3 , CC1311R3 , CC2651P3 , CC2651R3 , CC2651R3SIPA
The procedure takes the following input parameters:
The procedure returns the following:
The procedure returns with error if the first entry of the queue is already busy. If there is not room for an entry element of the specified size, including if the queue is empty, a no space error is returned. The following procedure describes the operations:
Set pFinishedEntry == NULL
If pQueue->pCurrEntry == NULL then
Return with no space error
end if
If pQueue->pCurrEntry->type != 1 then
if pQueue->pCurrEntry->length < size then
Return with no space error
else
Set pQueue->pCurrEntry->status = Busy
Set pEntry = pQueue->pCurrEntry
end if
else
Set pTemp = pQueue->pCurrEntry
If pTemp->nextIndex + 2 + size > pTemp->length then
Set pQueue->pCurrEntry = pTemp->pNextEntry
Set pTemp->status = Finished
Set pFinishedEntry = pTemp
Set pTemp = pTemp->pNextEntry
If pTemp == NULL or pTemp->length < size + 2 then
Return with no space error
end if
end if
Set pTemp->status = Busy
Set pEntry = pTemp
end if