diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/src/exec/posix/src/cond.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/c/src/exec/posix/src/cond.c b/c/src/exec/posix/src/cond.c index 03f2b67577..da45d9e2cb 100644 --- a/c/src/exec/posix/src/cond.c +++ b/c/src/exec/posix/src/cond.c @@ -11,6 +11,7 @@ #include <rtems/score/watchdog.h> #include <rtems/posix/cond.h> #include <rtems/posix/time.h> +#include <rtems/posix/mutex.h> /* * TEMPORARY @@ -378,8 +379,8 @@ int _POSIX_Condition_variables_Wait_support( return EINVAL; status = pthread_mutex_unlock( mutex ); - if ( !status ) - return status; + if ( status ) + return _POSIX_Mutex_From_core_mutex_status( status ); the_cond->Mutex = *mutex; @@ -390,8 +391,8 @@ int _POSIX_Condition_variables_Wait_support( _Thread_Enable_dispatch(); status = pthread_mutex_lock( mutex ); - if ( !status ) - return status; + if ( status ) + return _POSIX_Mutex_From_core_mutex_status( status ); return _Thread_Executing->Wait.return_code; } |