summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/condwaitsupp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-18 17:10:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-21 07:29:38 +0200
commitbeba41b504fcd1415cb89d86902692abe3e79501 (patch)
treee22129dd7fb56c65f1e1da13b9ce211834d34b05 /cpukit/posix/src/condwaitsupp.c
parentscore: Remove id parameter _CORE_mutex_Seize() (diff)
downloadrtems-beba41b504fcd1415cb89d86902692abe3e79501.tar.bz2
posix: _POSIX_Condition_variables_Wait_support()
Simplify _POSIX_Condition_variables_Wait_support(), since there is no need to validate the mutex twice.
Diffstat (limited to 'cpukit/posix/src/condwaitsupp.c')
-rw-r--r--cpukit/posix/src/condwaitsupp.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 0a7e30850d..c907f16cdd 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -40,19 +40,11 @@ int _POSIX_Condition_variables_Wait_support(
bool already_timedout
)
{
- POSIX_Condition_variables_Control *the_cond;
- POSIX_Mutex_Control *the_mutex;
- Objects_Locations location;
- int status;
- int mutex_status;
- Thread_Control *executing;
-
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
- if ( !the_mutex ) {
- return EINVAL;
- }
-
- _Objects_Put_without_thread_dispatch( &the_mutex->Object );
+ POSIX_Condition_variables_Control *the_cond;
+ Objects_Locations location;
+ int status;
+ int mutex_status;
+ Thread_Control *executing;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {