X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fthreads.c;h=78efab1a84ed1d76900f1ab9233b2599e48a0239;hb=0965ae7d651c32b206ed7aa92243d7fa497145c9;hp=a296b4b12c289f1a6b80e24ebee2dd7883f105de;hpb=1014a2aa09d4c4a529407b221676f9138416660b;p=vlc diff --git a/src/misc/threads.c b/src/misc/threads.c index a296b4b12c..78efab1a84 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -621,10 +621,12 @@ void vlc_cancel (vlc_thread_t thread_id) * @param p_result [OUT] pointer to write the thread return value or NULL * @return 0 on success, a standard error code otherwise. */ -int vlc_join (vlc_thread_t handle, void **result) +void vlc_join (vlc_thread_t handle, void **result) { #if defined( LIBVLC_USE_PTHREAD ) - return pthread_join (handle, result); + int val = pthread_join (handle, result); + if (val) + vlc_pthread_fatal ("joining thread", val, __FILE__, __LINE__); #elif defined( UNDER_CE ) || defined( WIN32 ) do @@ -636,15 +638,13 @@ int vlc_join (vlc_thread_t handle, void **result) if (result) *result = handle->data; free (handle); - return 0; #elif defined( HAVE_KERNEL_SCHEDULER_H ) int32_t exit_value; - ret = (B_OK == wait_for_thread( p_priv->thread_id, &exit_value )); - if( !ret && result ) + int val = (B_OK == wait_for_thread( p_priv->thread_id, &exit_value )); + if( !val && result ) *result = (void *)exit_value; - return ret; #endif }