diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-06-10 06:30:38 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-06-10 06:30:38 +0200 |
commit | a505fe156ba508d200731bc0e8f54d87dc7c4a8c (patch) | |
tree | 20baafd2a668782c5b8b746bb429506b2dec0a68 /source/tests/test_interprocess.c | |
parent | 01a97804ad06fc38800ec5520c715f4f6af3892c (diff) | |
download | kit-a505fe156ba508d200731bc0e8f54d87dc7c4a8c.zip |
Cleanup
Diffstat (limited to 'source/tests/test_interprocess.c')
-rw-r--r-- | source/tests/test_interprocess.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/tests/test_interprocess.c b/source/tests/test_interprocess.c index 7655192..027f4ae 100644 --- a/source/tests/test_interprocess.c +++ b/source/tests/test_interprocess.c @@ -21,7 +21,7 @@ int run_writer() { SZ(NAME), sizeof(shared_data_t), SHARED_MEMORY_CREATE); if (mem.status != KIT_OK) { - printf("%s: kit_shared_memory_open failed.\n", __FUNCTION__); + printf("Writer: kit_shared_memory_open failed.\n"); fflush(stdout); return 1; } @@ -52,7 +52,7 @@ int run_writer() { timespec_get(&t1, TIME_UTC); if (t1.tv_sec - t0.tv_sec > TIMEOUT) { - printf("%s: timeout.\n", __FUNCTION__); + printf("Writer: Timeout.\n"); shared_memory_close(&mem); return 1; } @@ -63,7 +63,7 @@ int run_writer() { shared_unlock(&p->m); if (shared_memory_close(&mem) != KIT_OK) { - printf("%s: kit_shared_memory_close failed.\n", __FUNCTION__); + printf("Writer: kit_shared_memory_close failed.\n"); fflush(stdout); return 1; } @@ -86,7 +86,7 @@ int run_reader() { timespec_get(&t1, TIME_UTC); if (t1.tv_sec - t0.tv_sec > TIMEOUT) { - printf("%s: timeout.\n", __FUNCTION__); + printf("Reader: Timeout.\n"); return 1; } @@ -104,7 +104,7 @@ int run_reader() { timespec_get(&t1, TIME_UTC); if (t1.tv_sec - t0.tv_sec > TIMEOUT) { - printf("%s: timeout.\n", __FUNCTION__); + printf("Reader: Timeout.\n"); return 1; } @@ -116,7 +116,7 @@ int run_reader() { for (i32 i = 0; i < DATA_SIZE; i++) if (p->bytes[i] != i) { - printf("%s: wrong byte %d\n", __FUNCTION__, i); + printf("Reader: Wrong byte %d\n", i); fflush(stdout); status = 1; } @@ -128,7 +128,7 @@ int run_reader() { unique_unlock(&p->m); if (shared_memory_close(&mem) != KIT_OK) { - printf("%s: kit_shared_memory_close failed.\n", __FUNCTION__); + printf("Reader: kit_shared_memory_close failed.\n"); fflush(stdout); status = 1; } @@ -154,7 +154,7 @@ int main(int argc, char **argv) { i64 sec = t1.tv_sec - t0.tv_sec; i64 nsec = t1.tv_nsec - t0.tv_nsec; - printf("Done in %.2lf msec\n", + printf("Writer: Done in %.2lf msec\n", (sec * 1000000000 + nsec) * 0.000001); fflush(stdout); |