summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/prwlockrdlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/prwlockrdlock.c')
-rw-r--r--cpukit/posix/src/prwlockrdlock.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/cpukit/posix/src/prwlockrdlock.c b/cpukit/posix/src/prwlockrdlock.c
index 5b15f5568f..4019c1fcb2 100644
--- a/cpukit/posix/src/prwlockrdlock.c
+++ b/cpukit/posix/src/prwlockrdlock.c
@@ -29,16 +29,13 @@ int pthread_rwlock_rdlock(
Thread_queue_Context queue_context;
Status_Control status;
- the_rwlock = _POSIX_RWLock_Get( rwlock, &queue_context );
-
- if ( the_rwlock == NULL ) {
- return EINVAL;
- }
+ the_rwlock = _POSIX_RWLock_Get( rwlock );
+ POSIX_RWLOCK_VALIDATE_OBJECT( the_rwlock );
+ _Thread_queue_Context_initialize( &queue_context );
_Thread_queue_Context_set_no_timeout( &queue_context );
status = _CORE_RWLock_Seize_for_reading(
&the_rwlock->RWLock,
- _Thread_Executing,
true, /* we are willing to wait forever */
&queue_context
);