MCPcopy Create free account
hub / github.com/FreeRTOS/FreeRTOS / prvIsQueueEmpty

Function prvIsQueueEmpty

FreeRTOS/Test/VeriFast/queue/prvIsQueueEmpty.c:33–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31#define taskEXIT_CRITICAL() clearInterruptMask( pxQueue )
32
33static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue )
34/*@requires [1/2]queuehandle(pxQueue, ?N, ?M, ?is_isr) &*& is_isr == false;@*/
35/*@ensures [1/2]queuehandle(pxQueue, N, M, is_isr);@*/
36{
37 BaseType_t xReturn;
38
39 taskENTER_CRITICAL();
40 /*@assert queue(pxQueue, ?Storage, N, M, ?W, ?R, ?K, ?is_locked, ?abs);@*/
41 {
42 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
43 {
44 xReturn = pdTRUE;
45 }
46 else
47 {
48 xReturn = pdFALSE;
49 }
50 }
51 /*@close queue(pxQueue, Storage, N, M, W, R, K, is_locked, abs);@*/
52 taskEXIT_CRITICAL();
53
54 return xReturn;
55}
56
57/* *INDENT-ON* */

Callers 2

xQueueReceiveFunction · 0.85
xQueuePeekFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected