diff options
Diffstat (limited to 'test/test_sem.c')
-rw-r--r-- | test/test_sem.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test_sem.c b/test/test_sem.c index 33859f1..bad0a44 100644 --- a/test/test_sem.c +++ b/test/test_sem.c @@ -14,7 +14,8 @@ static ZixSem sem; static unsigned n_signals = 1024; -static void* +ZIX_THREAD_FUNC +static ZixThreadResult reader(void* ZIX_UNUSED(arg)) { printf("Reader starting\n"); @@ -24,10 +25,11 @@ reader(void* ZIX_UNUSED(arg)) } printf("Reader finished\n"); - return NULL; + return ZIX_THREAD_RESULT; } -static void* +ZIX_THREAD_FUNC +static ZixThreadResult writer(void* ZIX_UNUSED(arg)) { printf("Writer starting\n"); @@ -37,7 +39,7 @@ writer(void* ZIX_UNUSED(arg)) } printf("Writer finished\n"); - return NULL; + return ZIX_THREAD_RESULT; } int @@ -62,8 +64,8 @@ main(int argc, char** argv) ZixThread writer_thread; // NOLINT assert(!zix_thread_create(&writer_thread, 128, writer, NULL)); - zix_thread_join(reader_thread, NULL); - zix_thread_join(writer_thread, NULL); + assert(!zix_thread_join(reader_thread)); + assert(!zix_thread_join(writer_thread)); zix_sem_destroy(&sem); return 0; |