summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/prwlockinit.c
diff options
context:
space:
mode:
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
);
}