summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-10-28 18:35:38 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-10-28 18:35:38 +0200
commit66783999ab3cef2d044951013ecc61abf3f31026 (patch)
treebcb00a8c18b5a4ade98b819686cfaea254788046
parent454901a6bd91048ac3152d7bcc26ee1b788f853f (diff)
downloadkit-66783999ab3cef2d044951013ecc61abf3f31026.zip
test
-rw-r--r--source/tests/test_interprocess.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/tests/test_interprocess.c b/source/tests/test_interprocess.c
index c793f81..308c511 100644
--- a/source/tests/test_interprocess.c
+++ b/source/tests/test_interprocess.c
@@ -73,9 +73,6 @@ 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);
@@ -97,13 +94,8 @@ int run_reader() {
return 1;
}
- thrd_yield();
- }
-
- if (mem.status != KIT_OK) {
- printf("%s: kit_shared_memory_open failed.\n", __FUNCTION__);
- fflush(stdout);
- return 1;
+ struct timespec delay = { .tv_sec = 0, .tv_nsec = 1000000 };
+ thrd_sleep(&delay, NULL);
}
shared_data_t *p = (shared_data_t *) mem.bytes;