28 #include <shm_arena.h>
30 static int running = 1;
34 static void catcher(
int sig)
36 printf(
"catch signal %d\n", sig);
45 signal(SIGINT, catcher);
47 q =
smq_get(NULL,
sizeof(
int), 22,
"q_count", O_CREAT);
50 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
int smq_unblock_rdlock(smq_t q)
unblock a smq_rdlock() call if needed
int smq_delete(smq_t q)
delete the local Shared Multi-Queue object
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