summaryrefslogtreecommitdiffstats
path: root/cpukit/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-10 07:44:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-10 07:50:00 +0200
commit6641cc87b87e0abf79138bbe0fbd303e04b547bf (patch)
treef936a51c4619aafdbd31a97ae8927d0826510941 /cpukit/include
parentsysconf: Remove sysconf(515) (diff)
downloadrtems-6641cc87b87e0abf79138bbe0fbd303e04b547bf.tar.bz2
score: Fix initialization of thread queue context
Set Thread_queue_Context::timeout_absolute in _Thread_queue_Context_set_timeout_argument() to avoid using it uninitialized. The bug was introduced by a89ecaa1a94d49ddae7753d6b83923e9d2a00486.
Diffstat (limited to 'cpukit/include')
-rw-r--r--cpukit/include/rtems/score/threadqimpl.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/cpukit/include/rtems/score/threadqimpl.h b/cpukit/include/rtems/score/threadqimpl.h
index 7b00de009d..44efc1fcd0 100644
--- a/cpukit/include/rtems/score/threadqimpl.h
+++ b/cpukit/include/rtems/score/threadqimpl.h
@@ -201,18 +201,24 @@ _Thread_queue_Context_set_timeout_ticks(
/**
* @brief Sets the timeout argument in the thread queue context.
*
- * @param[out] queue_context The thread queue context.
- * @param arg The timeout argument.
+ * @param[out] queue_context is the thread queue context.
+ *
+ * @param arg is the timeout argument.
+ *
+ * @param absolute is true, if the timeout shall be absolute, otherwise it
+ * shall be relative to the current time of the clock.
*
* @see _Thread_queue_Enqueue().
*/
RTEMS_INLINE_ROUTINE void
_Thread_queue_Context_set_timeout_argument(
Thread_queue_Context *queue_context,
- const void *arg
+ const void *arg,
+ bool absolute
)
{
queue_context->Timeout.arg = arg;
+ queue_context->timeout_absolute = absolute;
}
/**