diff options
Diffstat (limited to 'source/tests')
-rw-r--r-- | source/tests/test_interprocess.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/tests/test_interprocess.c b/source/tests/test_interprocess.c index b41f71f..c793f81 100644 --- a/source/tests/test_interprocess.c +++ b/source/tests/test_interprocess.c @@ -17,6 +17,9 @@ typedef struct { enum { STATE_INIT, STATE_READY, STATE_DONE }; int run_writer() { + printf("Run writer.\n"); + fflush(stdout); + shared_memory_t mem = shared_memory_open( SZ(NAME), sizeof(shared_data_t), SHARED_MEMORY_CREATE); @@ -70,6 +73,12 @@ int run_writer() { } int run_reader() { + struct timespec delay = { .tv_sec = 0, .tv_nsec = 10000000 }; + thrd_sleep(&delay, NULL); + + printf("Run reader.\n"); + fflush(stdout); + struct timespec t0; timespec_get(&t0, TIME_UTC); |