diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-08 13:10:24 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-12 08:11:08 +0200 |
commit | 62c912e15581e8d2dee9300b99e0532614f5c7e5 (patch) | |
tree | 13c016c8a4e309715aba28d13a3dcc45db698b79 /cpukit/posix/src | |
parent | i2c: TMP112 correct the function name to set the config. (diff) | |
download | rtems-62c912e15581e8d2dee9300b99e0532614f5c7e5.tar.bz2 |
posix: Use mutex object itself for condvar
We should only use the address used to initialize the mutex object
according to POSIX, "2.9.9 Synchronization Object Copies and Alternative
Mappings".
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09_09
Update #3113.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/condwaitsupp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c index 589b5e2810..486bab879c 100644 --- a/cpukit/posix/src/condwaitsupp.c +++ b/cpukit/posix/src/condwaitsupp.c @@ -38,7 +38,7 @@ static void _POSIX_Condition_variables_Enqueue_callout( the_cond = POSIX_CONDITION_VARIABLE_OF_THREAD_QUEUE_QUEUE( queue ); - mutex_error = pthread_mutex_unlock( &the_cond->mutex ); + mutex_error = pthread_mutex_unlock( the_cond->mutex ); if ( mutex_error != 0 ) { /* * Historically, we ignored the unlock status since the behavior @@ -107,13 +107,13 @@ int _POSIX_Condition_variables_Wait_support( if ( the_cond->mutex != POSIX_CONDITION_VARIABLES_NO_MUTEX - && the_cond->mutex != *mutex + && the_cond->mutex != mutex ) { _POSIX_Condition_variables_Release( the_cond, &queue_context ); return EINVAL; } - the_cond->mutex = *mutex; + the_cond->mutex = mutex; executing = _Thread_Executing; if ( !already_timedout ) { @@ -135,7 +135,7 @@ int _POSIX_Condition_variables_Wait_support( } else { _POSIX_Condition_variables_Release( the_cond, &queue_context ); - mutex_error = pthread_mutex_unlock( &the_cond->mutex ); + mutex_error = pthread_mutex_unlock( the_cond->mutex ); if ( mutex_error != 0 ) { error = EPERM; } else { |