From 454901a6bd91048ac3152d7bcc26ee1b788f853f Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sat, 28 Oct 2023 18:31:49 +0200 Subject: test --- source/tests/test_interprocess.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- cgit v1.2.3