#include <si_sys/defs.h>
#include <si_sys/blkalloc.h>
Go to the source code of this file.
Classes | |
struct | sc_queueNode |
A queueNode data structure. More... | |
struct | sc_queueNodeDesc |
A queue node descriptor. More... | |
struct | sc_queue |
Generic Queue object. More... | |
Typedefs | |
typedef struct sc_queueNode | sc_queueNode |
typedef sc_status(* | sc_queueNode_constructCopy_f )(void *, void *) |
typedef sc_status(* | sc_queueNode_assign_f )(void *, void *) |
typedef sc_status(* | sc_queueNode_destruct_f )(void *) |
Functions | |
sc_status | sc_queue_construct (sc_queue *q, const sc_queueNodeDesc *desc, s_int32 initialCapacity) |
sc_status | sc_queue_pushBack (sc_queue *q, void *pnt) |
sc_status | sc_queue_popFront (sc_queue *q, void *pnt) |
sc_status | sc_queue_destruct (sc_queue *q) |
typedef sc_status(* sc_queueNode_assign_f)(void *, void *) |
Assignment function signature for queue items.
typedef sc_status(* sc_queueNode_constructCopy_f)(void *, void *) |
Copy constructor function signature for queue items.
typedef sc_status(* sc_queueNode_destruct_f)(void *) |
Destruct function signature for queue items.
sc_status sc_queue_construct | ( | sc_queue * | q, | |
const sc_queueNodeDesc * | desc, | |||
s_int32 | initialCapacity | |||
) |
Constructor for the generic queue object.
[in,out] | q | The queue object to construct. |
[in] | desc | The descriptor for the queue items. |
[in] | initialCapacity | The allocator will make sure there is enough storage for initialCapacity items to be pushed without allocator growth. |
sc_status sc_queue_destruct | ( | sc_queue * | q | ) |
Destruct the queue q.
sc_status sc_queue_popFront | ( | sc_queue * | q, | |
void * | pnt | |||
) |
Pop item pnt from the front of the queue q.
[in,out] | q | Queue to pop from. |
[in,out] | pnt | Item to assign the value to. |
Items are popped by value. To queue references to particular objects, make a queue of pointer-handles.
sc_status sc_queue_pushBack | ( | sc_queue * | q, | |
void * | pnt | |||
) |
Push item pnt onto the back of the queue q.