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/include/rtems/score/threadq.h | |
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 'cpukit/include/rtems/score/threadq.h')
-rw-r--r-- | cpukit/include/rtems/score/threadq.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/include/rtems/score/threadq.h b/cpukit/include/rtems/score/threadq.h index 5234019b81..10476888d4 100644 --- a/cpukit/include/rtems/score/threadq.h +++ b/cpukit/include/rtems/score/threadq.h @@ -214,7 +214,8 @@ struct Thread_queue_Context { * callout must be used to install the thread watchdog for timeout handling. * * @see _Thread_queue_Enqueue_do_nothing_extra(). - * _Thread_queue_Add_timeout_ticks(), and + * _Thread_queue_Add_timeout_ticks(), + * _Thread_queue_Add_timeout_monotonic_timespec(), and * _Thread_queue_Add_timeout_realtime_timespec(). */ Thread_queue_Enqueue_callout enqueue_callout; @@ -236,6 +237,12 @@ struct Thread_queue_Context { const void *arg; } Timeout; + /** + * @brief If this member is true, the timeout shall be absolute, otherwise it + * shall be relative to the current time of the clock. + */ + bool timeout_absolute; + #if defined(RTEMS_SMP) /** * @brief Representation of a thread queue path from a start thread queue to |