nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_802154_queue_pop_begin()

void * nrf_802154_queue_pop_begin ( const nrf_802154_queue_t * p_queue)

Returns pointer to the next item to be read from the queue.

This function is to be used when reading data from the queue directly (no copy). Returned pointer is valid when the queue is not empty (nrf_802154_queue_is_empty returned false). To ensure thread-safety external locking is required.

To read an item from the queue perform following.

{
my_item_t * p_item = (my_item_t *)nrf_802154_queue_pop_begin(&queue);
... read & process data pointed by p_item
}
void nrf_802154_queue_pop_commit(nrf_802154_queue_t *p_queue)
Increments read pointer of the queue.
void * nrf_802154_queue_pop_begin(const nrf_802154_queue_t *p_queue)
Returns pointer to the next item to be read from the queue.
static bool nrf_802154_queue_is_empty(const nrf_802154_queue_t *p_queue)
Checks if the queue is empty.
Definition nrf_802154_queue.h:146
Parameters
[in]p_queuePointer to the queue instance.
Returns
Pointer to the next item to be written.