diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-18 12:50:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-18 18:47:43 +0200 |
commit | a89ecaa1a94d49ddae7753d6b83923e9d2a00486 (patch) | |
tree | 2fccf3fd6b5a82f0415b497db190fbfa582a3866 /cpukit/posix/src/prwlocktimedwrlock.c | |
parent | posix: Fix use of clock for relative times (diff) | |
download | rtems-a89ecaa1a94d49ddae7753d6b83923e9d2a00486.tar.bz2 |
score: Simplify thread queue timeout handling
Add Thread_queue_Context::timeout_absolute to specify an absolute or
relative timeout. This avoid having to get the current time twice for
timeouts relative to the current time. It moves also functionality to
common code.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/prwlocktimedwrlock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/posix/src/prwlocktimedwrlock.c b/cpukit/posix/src/prwlocktimedwrlock.c index 9fb9a880a0..614d230ba9 100644 --- a/cpukit/posix/src/prwlocktimedwrlock.c +++ b/cpukit/posix/src/prwlocktimedwrlock.c @@ -39,7 +39,8 @@ int pthread_rwlock_timedwrlock( _Thread_queue_Context_initialize( &queue_context ); _Thread_queue_Context_set_enqueue_timeout_realtime_timespec( &queue_context, - abstime + abstime, + true ); status = _CORE_RWLock_Seize_for_writing( &the_rwlock->RWLock, |