RTEMS | cpukit/posix Added pthread clock functions (!547)
Joel Sherrill (@joel)
gitlab at rtems.org
Wed Jul 9 16:45:20 UTC 2025
Joel Sherrill started a new discussion on cpukit/posix/src/mutexclocklock.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126223
> +
> +#include <rtems/posix/muteximpl.h>
> +
> +int pthread_mutex_clocklock(
> + pthread_mutex_t *mutex,
> + clockid_t clock_id,
> + const struct timespec *abstime
> +)
> +{
> + if ( clock_id == CLOCK_REALTIME ) {
> + return _POSIX_Mutex_Lock_support(
> + mutex,
> + abstime,
> + _Thread_queue_Add_timeout_realtime_timespec
> + );
> + } else if ( clock_id == CLOCK_MONOTONIC ) {
No need to have an else since each returns.
```
if X {
}
if X {
}
return
```
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/547#note_126223
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/9fa29be4/attachment.htm>
More information about the bugs
mailing list