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/prwlocktryrdlock.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/prwlocktryrdlock.c')
-rw-r--r-- | cpukit/posix/src/prwlocktryrdlock.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cpukit/posix/src/prwlocktryrdlock.c b/cpukit/posix/src/prwlocktryrdlock.c index 052f1b011e..e934d286ae 100644 --- a/cpukit/posix/src/prwlocktryrdlock.c +++ b/cpukit/posix/src/prwlocktryrdlock.c @@ -29,15 +29,12 @@ int pthread_rwlock_tryrdlock( 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 ); status = _CORE_RWLock_Seize_for_reading( &the_rwlock->RWLock, - _Thread_Executing, false, /* do not wait for the rwlock */ &queue_context ); |