summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/prwlockinit.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-21 06:32:16 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-22 09:25:09 +0200
commit84a539885335c629100a6a12b57ead54bbbc0165 (patch)
treeff8d0acd9624e3888dc7fc6df9003a98a19b9b3d /cpukit/posix/src/prwlockinit.c
parentscore: Avoid Giant lock for barriers (diff)
downloadrtems-84a539885335c629100a6a12b57ead54bbbc0165.tar.bz2
score: Avoid Giant lock for CORE rwlock
Update #2555.
Diffstat (limited to 'cpukit/posix/src/prwlockinit.c')
-rw-r--r--cpukit/posix/src/prwlockinit.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/cpukit/posix/src/prwlockinit.c b/cpukit/posix/src/prwlockinit.c
index afb70563e0..8bbb2fda8f 100644
--- a/cpukit/posix/src/prwlockinit.c
+++ b/cpukit/posix/src/prwlockinit.c
@@ -20,20 +20,14 @@
#include "config.h"
#endif
-#include <pthread.h>
-#include <errno.h>
-
#include <rtems/posix/rwlockimpl.h>
#include <rtems/score/apimutex.h>
static bool _POSIX_RWLock_Check_id_and_auto_init(
- pthread_mutex_t *rwlock,
- Objects_Locations *location
+ pthread_mutex_t *rwlock
)
{
if ( rwlock == NULL ) {
- *location = OBJECTS_ERROR;
-
return false;
}
@@ -51,8 +45,6 @@ static bool _POSIX_RWLock_Check_id_and_auto_init(
_Once_Unlock();
if ( eno != 0 ) {
- *location = OBJECTS_ERROR;
-
return false;
}
}
@@ -61,18 +53,18 @@ static bool _POSIX_RWLock_Check_id_and_auto_init(
}
POSIX_RWLock_Control *_POSIX_RWLock_Get(
- pthread_rwlock_t *rwlock,
- Objects_Locations *location
+ pthread_rwlock_t *rwlock,
+ ISR_lock_Context *lock_context
)
{
- if ( !_POSIX_RWLock_Check_id_and_auto_init( rwlock, location ) ) {
+ if ( !_POSIX_RWLock_Check_id_and_auto_init( rwlock ) ) {
return NULL;
}
- return (POSIX_RWLock_Control *) _Objects_Get(
- &_POSIX_RWLock_Information,
+ return (POSIX_RWLock_Control *) _Objects_Get_local(
*rwlock,
- location
+ &_POSIX_RWLock_Information,
+ lock_context
);
}