X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fplatform%2Fposix%2Fos-threads.h;h=89f822b0dec300a89aee85d2f55e62871fac9080;hb=f5aa7e4ce43db8b8e9d6d494176261da768e6427;hp=8b56731adfa2918f2a290e71dd4acc62ce2b7709;hpb=1b469124aa1f79269686492c391d54e43525ccf4;p=deb_libcec.git diff --git a/src/lib/platform/posix/os-threads.h b/src/lib/platform/posix/os-threads.h index 8b56731..89f822b 100644 --- a/src/lib/platform/posix/os-threads.h +++ b/src/lib/platform/posix/os-threads.h @@ -66,7 +66,7 @@ namespace PLATFORM typedef pthread_t thread_t; #define ThreadsCreate(thread, func, arg) (pthread_create(&thread, NULL, (void *(*) (void *))func, (void *)arg) == 0) - #define ThreadsWait(thread, retval) (pthread_join(thread, retval) == 0) + #define ThreadsWait(thread, retval) (thread ? pthread_join(thread, retval) == 0 : true) typedef pthread_mutex_t mutex_t; #define MutexCreate(mutex) pthread_mutex_init(&mutex, GetRecursiveMutexAttribute());