14 sizeof(buf) /
sizeof(buf[0]));
20 assert(NULL != item_p);
27 assert(NULL != item_p);
34 assert(NULL != item_p);
39 assert(NULL != item_p);
43 assert(NULL != item_p);
50 assert(NULL != item_p);
55 assert(NULL != item_p);
59 assert(NULL != item_p);
66 assert(NULL != item_p);
73 assert(NULL != item_p);
81 assert(NULL != item_p);
85 assert(NULL != item_p);
98 assert(NULL != item_p);
102 assert(NULL != item_p);
109 assert(NULL != item_p);
110 assert(17 == *item_p);
129 int main(
int argc,
char *argv[])
132 fprintf(stderr,
"Usage: %s test_id\n", argv[0]);
136 switch (argv[1][0]) {
141 fprintf(stderr,
"Invalid test_id: %s \n", argv[1]);
void hipcQueueClear(struct HIPC_queue *const que_p)
Clears a queue.
static void test_hipcQueue(void)
void hipcQueueInit(struct HIPC_queue *const que_p, void *const buf_p, const size_t item_size, const size_t n_slot)
Initializes a queue.
void hipcQueuePop(struct HIPC_queue *const que_p)
Pops an item and releases a slot.
int main(int argc, char *argv[])
void hipcQueuePush(struct HIPC_queue *const que_p)
Pushes an item and occupies a slot.
void * hipcQueueEmpty(struct HIPC_queue *const que_p)
Returns an address of the head item if it exists.
void * hipcQueueFull(struct HIPC_queue const *const que_p)
Returns an address of an empty slot if it exists.
size_t hipcQueueItemSize(struct HIPC_queue *const que_p)
Gets item size.