diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-10-28 18:31:49 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-10-28 18:31:49 +0200 |
commit | 454901a6bd91048ac3152d7bcc26ee1b788f853f (patch) | |
tree | b08dca45d64569b17e60fe12d4d2a9749d968ac7 | |
parent | b674f3112589f16748721a0b4cbd114059f5a81b (diff) | |
download | kit-454901a6bd91048ac3152d7bcc26ee1b788f853f.zip |
test
-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); |