![]() |
Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
|
Go to the source code of this file.
Data Structures | |
struct | queue |
Typedefs | |
typedef struct queue | utils_queue_s |
Functions | |
struct queue | __attribute__ ((aligned(CONF_CACHE_LINE))) |
utils_queue_s * | utils_queue_init (void *buff) |
unsigned int | utils_queue_used_slots (utils_queue_s *q) |
void * | utils_queue_push (utils_queue_s *q, void *data) |
void * | utils_queue_pop (utils_queue_s *q) |
void * | utils_queue_peek (utils_queue_s *q) |
Variables | |
void * | entries [UTILS_QUEUE_CAPACITY] |
typedef struct queue utils_queue_s |
volatile uint16_t top __attribute__ | ( | (aligned(CONF_CACHE_LINE)) | ) |
Push here
Pop here
utils_queue_s * utils_queue_init | ( | void * | buff | ) |
Initialize a queue at the memory pointed by buff.
buff | Allocated buffer. |
Definition at line 39 of file queue.c.
References arax_assert, and utils_spinlock_init.
Referenced by arax_vaccel_init().
void * utils_queue_peek | ( | utils_queue_s * | q | ) |
Peek first element from queue if any
q | Valid queue instance pointer. |
Definition at line 126 of file queue.c.
References queue::entries.
void * utils_queue_pop | ( | utils_queue_s * | q | ) |
Pop data from queue.
q | Valid queue instance pointer. |
Definition at line 63 of file queue.c.
References arax_assert, and queue::entries.
void * utils_queue_push | ( | utils_queue_s * | q, |
void * | data ) |
Add data to an queue
q | Valid queue instance pointer. |
data | Non NULL pointer to data. |
Definition at line 89 of file queue.c.
References arax_assert, queue::entries, utils_spinlock_lock, and utils_spinlock_unlock.
Referenced by arax_vaccel_add_task().
unsigned int utils_queue_used_slots | ( | utils_queue_s * | q | ) |
Return number of used slots in the queue.
NOTE: Since this is a concurrent queue the value returned by this function may not always reflect the true state of the queue
q | Valid queue instance pointer. |
Definition at line 51 of file queue.c.
Referenced by arax_vaccel_queue_size().