RTEMS | cpukit/posix: Add clock support to thread queue timeouts (!618)
mazen Adel (@mez3n)
gitlab at rtems.org
Mon Aug 18 11:26:43 UTC 2025
mazen Adel commented on a discussion on cpukit/score/src/threadqtimeout.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/618#note_128934
> +
> +void _Thread_queue_Add_timeout_by_clock_id_timespec(
> + Thread_queue_Queue *queue,
> + Thread_Control *the_thread,
> + Per_CPU_Control *cpu_self,
> + Thread_queue_Context *queue_context
> +)
> +{
> + if ( queue_context->clock_id == CLOCK_MONOTONIC ) {
> + _Thread_queue_Add_timeout_monotonic_timespec(
> + queue,
> + the_thread,
> + cpu_self,
> + queue_context
> + );
> + } else {
Done, I added
`_Assert( queue_context->clock_id == CLOCK_REALTIME || queue_context->clock_id == CLOCK_MONOTONIC);`
before the If, I think it is easier to understand.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/618#note_128934
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250818/3875bea7/attachment-0001.htm>
More information about the bugs
mailing list