34 #define N_MESSAGES 100
35 #define SHARED_SIZE (apr_size_t)(N_BOXES * sizeof(mbox))
36 #define SHARED_FILENAME "data/apr.testshm.shm"
37 #define MSG "Sending a message"
39 #if APR_HAS_SHARED_MEMORY
42 int msgwait(
const char *msg,
int count,
int duration,
int sleep_ms)
52 assert(strcmp(
boxes[i].msg, msg) == 0);
55 if (++recvd == count) {
66 int msgput(
const char *msg,
int boxnum)
APR Platform Definitions.
void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with, apr_uint32_t cmp)
char * apr_cpystrn(char *dst, const char *src, apr_size_t dst_size)
void apr_sleep(apr_interval_time_t t)
#define apr_time_from_msec(msec)
Definition: apr_time.h:75
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
apr_time_t apr_time_now(void)
apr_int64_t apr_time_t
Definition: apr_time.h:45
#define apr_time_from_sec(sec)
Definition: apr_time.h:78
apr_uint32_t msgavail
Definition: testshm.h:29
char msg[1024]
Definition: testshm.h:28
mbox * boxes
Definition: testshm.h:31
#define N_BOXES
Definition: testshm.h:33