29 #include <shm_arena.h>
31 static int running = 1;
33 static void catcher(
int sig)
35 printf(
"catch signal %d\n", sig);
43 signal(SIGINT, catcher);
45 q =
smq_get(NULL,
sizeof(
int), 20,
"q_count", O_CREAT);
48 printf(
"smq_get() failed\n");
smq_t smq_get(shm_arena_t arena, size_t element_size, int q_length, const char *name, int flags)
get a Shared Multi-Queue object
int smq_rdlock(smq_t q, int num)
acquire Shared Multi-Queue read-lock
struct smq * smq_t
shared multi-queue object
int smq_unlock(smq_t q)
release Shared Multi-Queue read or write lock
void * smq_read(smq_t q)
read the next entry from the Shared Multi-Queue