v2.0.0
Data Structures | Macros | Functions
queue.h File Reference
`#include "pico.h"`
`#include "hardware/sync.h"`
`#include "pico/lock_core.h"`
Include dependency graph for queue.h:

Go to the source code of this file.

## Data Structures
struct | queue_t

## Macros
#define | PICO_QUEUE_MAX_LEVEL 0

## Functions
void | queue_init_with_spinlock (queue_t *q, uint element_size, uint element_count, uint spinlock_num)
| Initialise a queue with a specific spinlock for concurrency protection. More...
static void | queue_init (queue_t *q, uint element_size, uint element_count)
| Initialise a queue, allocating a (possibly shared) spinlock. More...
void | queue_free (queue_t *q)
| Destroy the specified queue. More...
static uint | queue_get_level_unsafe (queue_t *q)
| Unsafe check of level of the specified queue. More...
static uint | queue_get_level (queue_t *q)
| Check of level of the specified queue. More...
static bool | queue_is_empty (queue_t *q)
| Check if queue is empty. More...
static bool | queue_is_full (queue_t *q)
| Check if queue is full. More...
bool | queue_try_add (queue_t *q, const void *data)
| Non-blocking add value queue if not full. More...
bool | queue_try_remove (queue_t *q, void *data)
| Non-blocking removal of entry from the queue if non empty. More...
bool | queue_try_peek (queue_t *q, void *data)
| Non-blocking peek at the next item to be removed from the queue. More...
void | queue_add_blocking (queue_t *q, const void *data)
| Blocking add of value to queue. More...
void | queue_remove_blocking (queue_t *q, void *data)
| Blocking remove entry from queue. More...
void | queue_peek_blocking (queue_t *q, void *data)
| Blocking peek at next value to be removed from queue. More...