diff options
Diffstat (limited to 'cpukit/posix/src/prwlockwrlock.c')
-rw-r--r-- | cpukit/posix/src/prwlockwrlock.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cpukit/posix/src/prwlockwrlock.c b/cpukit/posix/src/prwlockwrlock.c index a78554f878..df4d2685aa 100644 --- a/cpukit/posix/src/prwlockwrlock.c +++ b/cpukit/posix/src/prwlockwrlock.c @@ -23,8 +23,6 @@ #include <rtems/posix/rwlockimpl.h> #include <rtems/posix/posixapi.h> -THREAD_QUEUE_OBJECT_ASSERT( POSIX_RWLock_Control, RWLock.Wait_queue ); - int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) @@ -33,16 +31,13 @@ int pthread_rwlock_wrlock( 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_writing( &the_rwlock->RWLock, - _Thread_Executing, true, /* do not timeout -- wait forever */ &queue_context ); |