summaryrefslogtreecommitdiff
path: root/source/tests
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-10-28 18:31:49 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-10-28 18:31:49 +0200
commit454901a6bd91048ac3152d7bcc26ee1b788f853f (patch)
treeb08dca45d64569b17e60fe12d4d2a9749d968ac7 /source/tests
parentb674f3112589f16748721a0b4cbd114059f5a81b (diff)
downloadkit-454901a6bd91048ac3152d7bcc26ee1b788f853f.zip
test
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/test_interprocess.c9
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);