Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Functions
WSF_QUEUE_API

Data Structures

struct  wsfQueue_t
 Queue structure. More...
 

Macros

#define WSF_QUEUE_INIT(pQueue)    {(pQueue)->pHead = NULL; (pQueue)->pTail = NULL;}
 Initialize a queue. More...
 

Functions

void WsfQueueEnq (wsfQueue_t *pQueue, void *pElem)
 Enqueue an element to the tail of a queue. More...
 
void * WsfQueueDeq (wsfQueue_t *pQueue)
 Dequeue an element from the head of a queue. More...
 
void WsfQueuePush (wsfQueue_t *pQueue, void *pElem)
 Push an element to the head of a queue. More...
 
void WsfQueueInsert (wsfQueue_t *pQueue, void *pElem, void *pPrev)
 Insert an element into a queue. This function is typically used when iterating over a queue. More...
 
void WsfQueueRemove (wsfQueue_t *pQueue, void *pElem, void *pPrev)
 Remove an element from a queue. This function is typically used when iterating over a queue. More...
 
uint16_t WsfQueueCount (wsfQueue_t *pQueue)
 Count the number of elements in a queue. More...
 
bool_t WsfQueueEmpty (wsfQueue_t *pQueue)
 Return TRUE if queue is empty. More...
 
bool_t WsfIsQueueDepthOne (wsfQueue_t *pQueue)
 Check for a queue depth of 1 element. More...
 

Detailed Description

Macro Definition Documentation

#define WSF_QUEUE_INIT (   pQueue)    {(pQueue)->pHead = NULL; (pQueue)->pTail = NULL;}

Initialize a queue.

Definition at line 39 of file wsf_queue.h.

Function Documentation

bool_t WsfIsQueueDepthOne ( wsfQueue_t pQueue)

Check for a queue depth of 1 element.

Parameters
pQueueQueue.
Returns
TRUE if Queue only has 1 element, FALSE otherwise.
uint16_t WsfQueueCount ( wsfQueue_t pQueue)

Count the number of elements in a queue.

Parameters
pQueuePointer to queue.
Returns
Number of elements in queue.
void* WsfQueueDeq ( wsfQueue_t pQueue)

Dequeue an element from the head of a queue.

Parameters
pQueuePointer to queue.
Returns
Pointer to element that has been dequeued or NULL if queue is empty.
bool_t WsfQueueEmpty ( wsfQueue_t pQueue)

Return TRUE if queue is empty.

Parameters
pQueuePointer to queue.
Returns
TRUE if queue is empty, FALSE otherwise.
void WsfQueueEnq ( wsfQueue_t pQueue,
void *  pElem 
)

Enqueue an element to the tail of a queue.

Parameters
pQueuePointer to queue.
pElemPointer to element.
void WsfQueueInsert ( wsfQueue_t pQueue,
void *  pElem,
void *  pPrev 
)

Insert an element into a queue. This function is typically used when iterating over a queue.

Parameters
pQueuePointer to queue.
pElemPointer to element to be inserted.
pPrevPointer to previous element in the queue before element to be inserted. Note: set pPrev to NULL if pElem is first element in queue.
Returns
None.
void WsfQueuePush ( wsfQueue_t pQueue,
void *  pElem 
)

Push an element to the head of a queue.

Parameters
pQueuePointer to queue.
pElemPointer to element.
void WsfQueueRemove ( wsfQueue_t pQueue,
void *  pElem,
void *  pPrev 
)

Remove an element from a queue. This function is typically used when iterating over a queue.

Parameters
pQueuePointer to queue.
pElemPointer to element to be removed.
pPrevPointer to previous element in the queue before element to be removed.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.