[PATCH] Update: _Semaphore_Wait_timed to include clock selection

Mazen Adel Elmessady <[email protected]> Tue, 24 Feb 2026 16:48:56 +0200
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Updated _Semaphore_Wait_timed (which is currently unused in RTEMS)
to _Semaphore_Wait_timed_clock which
to be used in RTEMS sempahore API.
This will ease the support of the new clock
functions added in Posix Issue 8.
---
 newlib/libc/sys/rtems/include/sys/lock.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
index d6169025b..c2728ce5a 100644
--- a/newlib/libc/sys/rtems/include/sys/lock.h
+++ b/newlib/libc/sys/rtems/include/sys/lock.h
@@ -27,6 +27,7 @@
 #define _SYS_LOCK_H_
 
 #include <sys/cdefs.h>
+#include <sys/_timespec.h>
 #include <stddef.h>
 
 __BEGIN_DECLS
@@ -295,8 +296,8 @@ _Semaphore_Get_name(const struct _Semaphore_Control *_semaphore)
 
 void _Semaphore_Wait(struct _Semaphore_Control *);
 
-int _Semaphore_Wait_timed(struct _Semaphore_Control *,
-    const struct timespec *);
+int _Semaphore_Wait_timed_clock(struct _Semaphore_Control *,
+    const struct timespec *, __clockid_t);
 
 int _Semaphore_Wait_timed_ticks(struct _Semaphore_Control *, __uint32_t);
 
-- 
2.51.0