From a0ea0b258dd0095bfe7d7ae251247af2389a2603 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 21 Mar 2016 01:33:13 +0000 Subject: [PATCH] fix bug in rthreads resource creation on win32 (spurious failures) --- desmume/src/libretro-common/rthreads/rthreads.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/libretro-common/rthreads/rthreads.c b/desmume/src/libretro-common/rthreads/rthreads.c index 4fc312183..25052ec3b 100644 --- a/desmume/src/libretro-common/rthreads/rthreads.c +++ b/desmume/src/libretro-common/rthreads/rthreads.c @@ -124,7 +124,7 @@ sthread_t *sthread_create(void (*thread_func)(void*), void *userdata) #ifdef USE_WIN32_THREADS thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, NULL); - thread_created = thread->thread; + thread_created = !!thread->thread; #else thread_created = pthread_create(&thread->id, NULL, thread_wrap, data) == 0; #endif @@ -222,7 +222,7 @@ slock_t *slock_new(void) #ifdef USE_WIN32_THREADS lock->lock = CreateMutex(NULL, FALSE, NULL); - mutex_created = lock->lock; + mutex_created = !!lock->lock; #else mutex_created = (pthread_mutex_init(&lock->lock, NULL) == 0); #endif @@ -307,7 +307,7 @@ scond_t *scond_new(void) #ifdef USE_WIN32_THREADS cond->event = CreateEvent(NULL, FALSE, FALSE, NULL); - event_created = cond->event; + event_created = !!cond->event; #else event_created = (pthread_cond_init(&cond->cond, NULL) == 0); #endif