28 #include <shm_arena.h>
30 static int running = 1;
33 static void catcher(
int sig)
35 printf(
"catch signal %d\n", sig);
44 long double offset = 0;
46 signal(SIGINT, catcher);
53 printf(
"smq_get() failed\n");
70 if(offset == 0) offset = *t;
71 printf(
"(%Lf)%d ", *t - offset, *ptr);
long double * smq_timestamp(smq_t q, const void *ptr)
read or write the time stamp
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
#define SHM_TIMESTAMP
smq_get() flag for adding a timestamp to entries
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