diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-19 06:28:03 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-21 07:29:39 +0200 |
commit | 48b04fc388a60fc6621233ddbb7cd65d89bb63d8 (patch) | |
tree | ebbb0661161ebe5b809fcde7627e1887811d1fc7 /cpukit/posix/src/mutexget.c | |
parent | score: Add and use _CORE_mutex_Acquire_critical() (diff) | |
download | rtems-48b04fc388a60fc6621233ddbb7cd65d89bb63d8.tar.bz2 |
posix: Avoid Giant lock for mutexes
Delete _POSIX_Mutex_Get(). Use _POSIX_Mutex_Get_interrupt_disable()
instead.
Update #2555.
Diffstat (limited to 'cpukit/posix/src/mutexget.c')
-rw-r--r-- | cpukit/posix/src/mutexget.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/cpukit/posix/src/mutexget.c b/cpukit/posix/src/mutexget.c index 9ad226a4f9..9d34ecb583 100644 --- a/cpukit/posix/src/mutexget.c +++ b/cpukit/posix/src/mutexget.c @@ -21,14 +21,9 @@ #include <rtems/posix/muteximpl.h> #include <rtems/score/apimutex.h> -static bool _POSIX_Mutex_Check_id_and_auto_init( - pthread_mutex_t *mutex, - Objects_Locations *location -) +static bool _POSIX_Mutex_Check_id_and_auto_init( pthread_mutex_t *mutex ) { if ( mutex == NULL ) { - *location = OBJECTS_ERROR; - return false; } @@ -46,8 +41,6 @@ static bool _POSIX_Mutex_Check_id_and_auto_init( _Once_Unlock(); if ( eno != 0 ) { - *location = OBJECTS_ERROR; - return false; } } @@ -55,19 +48,6 @@ static bool _POSIX_Mutex_Check_id_and_auto_init( return true; } -POSIX_Mutex_Control *_POSIX_Mutex_Get ( - pthread_mutex_t *mutex, - Objects_Locations *location -) -{ - if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex, location ) ) { - return NULL; - } - - return (POSIX_Mutex_Control *) - _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); -} - POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable( pthread_mutex_t *mutex, ISR_lock_Context *lock_context @@ -75,7 +55,7 @@ POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable( { Objects_Locations location; - if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex, &location ) ) { + if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex ) ) { return NULL; } |