diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-21 15:42:45 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-05 14:29:02 +0200 |
commit | 89fc9345dea5c675f8d93546fa3c723918d3279a (patch) | |
tree | 89c32d64f375e1a9bf9d3725b1256aeb7ca46221 /cpukit/posix/src/prwlocktimedwrlock.c | |
parent | posix: Implement self-contained POSIX barriers (diff) | |
download | rtems-89fc9345dea5c675f8d93546fa3c723918d3279a.tar.bz2 |
posix: Implement self-contained POSIX rwlocks
POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3115.
Diffstat (limited to 'cpukit/posix/src/prwlocktimedwrlock.c')
-rw-r--r-- | cpukit/posix/src/prwlocktimedwrlock.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cpukit/posix/src/prwlocktimedwrlock.c b/cpukit/posix/src/prwlocktimedwrlock.c index 1fd57c0106..1f1e654d53 100644 --- a/cpukit/posix/src/prwlocktimedwrlock.c +++ b/cpukit/posix/src/prwlocktimedwrlock.c @@ -52,16 +52,13 @@ int pthread_rwlock_timedwrlock( timeout_status = _TOD_Absolute_timeout_to_ticks( abstime, CLOCK_REALTIME, &ticks ); do_wait = ( timeout_status == TOD_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ); - 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_relative_timeout( &queue_context, ticks ); status = _CORE_RWLock_Seize_for_writing( &the_rwlock->RWLock, - _Thread_Executing, do_wait, &queue_context ); |