RTEMS | cpukit/posix Added pthread clock functions (!547)
Joel Sherrill (@joel)
gitlab at rtems.org
Wed Jul 9 16:51:22 UTC 2025
Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547 was reviewed by Joel Sherrill
--
Joel Sherrill started a new discussion on cpukit/posix/src/condclockwait.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126224
> + return EINVAL;
> + }
> + if ( clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME ) {
Add blank lines
--
Joel Sherrill started a new discussion on cpukit/posix/src/condtimedwait.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126225
> - abstime
> - );
> + return _POSIX_Condition_variables_Wait_support( cond, mutex, abstime, NULL );
Declare a local variable for clockid and set it based on the attribute from creation.
--
Joel Sherrill started a new discussion on cpukit/posix/src/condwait.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126226
> - NULL
> - );
> + return _POSIX_Condition_variables_Wait_support( cond, mutex, NULL, NULL );
NULL for time can be used to skip timeout enqueuing in the support routine. The clock value can be any valid value and not be NULL. It is ignored anyway.
--
Joel Sherrill started a new discussion on cpukit/posix/src/condwaitsupp.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126227
> + pthread_mutex_t *mutex,
> + const struct timespec *abstime,
> + clockid_t *clockid
No pointer for clockid.
--
Joel Sherrill started a new discussion on cpukit/posix/src/condwaitsupp.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126228
> - _POSIX_Condition_variables_Enqueue_with_timeout_realtime
> - );
> + if ( _POSIX_Condition_variables_Get_clock( flags ) == CLOCK_MONOTONIC ) {
It would be cleaner to use clockid directly as not a pointer type. Set it to a valid clock id value in the caller based on the method.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547
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/20250709/ada66c72/attachment-0001.htm>
More information about the bugs
mailing list