[PATCH 09/20] posix: _POSIX_Condition_variables_Wait_support()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 19 13:12:37 UTC 2016


Simplify _POSIX_Condition_variables_Wait_support(), since there is no
need to validate the mutex twice.
---
 cpukit/posix/src/condwaitsupp.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 0a7e308..c907f16 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 ) {
-- 
1.8.4.5




More information about the devel mailing list