Skip to content

Commit 0233065

Browse files
committed
Add support for pthread_clockjoin_np(3)
1 parent c0dcfff commit 0233065

File tree

13 files changed

+394
-16
lines changed

13 files changed

+394
-16
lines changed

kos/include/i386-kos/crt-features/crt-kos32.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@
13171317
#define __CRT_HAVE___pthread_barrier_init
13181318
#define __CRT_HAVE___pthread_barrier_wait
13191319
#define __CRT_HAVE___pthread_cleanup_routine
1320+
#define __CRT_HAVE___pthread_clockjoin_np64
13201321
#define __CRT_HAVE___pthread_cond_clockwait64
13211322
#define __CRT_HAVE___pthread_cond_destroy
13221323
#define __CRT_HAVE___pthread_cond_init
@@ -4667,6 +4668,8 @@
46674668
#define __CRT_HAVE_pthread_barrierattr_init
46684669
#define __CRT_HAVE_pthread_barrierattr_setpshared
46694670
#define __CRT_HAVE_pthread_cancel
4671+
#define __CRT_HAVE_pthread_clockjoin64_np
4672+
#define __CRT_HAVE_pthread_clockjoin_np
46704673
#define __CRT_HAVE_pthread_cond_broadcast
46714674
#define __CRT_HAVE_pthread_cond_clockwait
46724675
#define __CRT_HAVE_pthread_cond_clockwait64

kos/include/i386-kos/crt-features/crt-kos64.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,6 +4351,7 @@
43514351
#define __CRT_HAVE_pthread_barrierattr_init
43524352
#define __CRT_HAVE_pthread_barrierattr_setpshared
43534353
#define __CRT_HAVE_pthread_cancel
4354+
#define __CRT_HAVE_pthread_clockjoin_np
43544355
#define __CRT_HAVE_pthread_cond_broadcast
43554356
#define __CRT_HAVE_pthread_cond_clockwait
43564357
#define __CRT_HAVE_pthread_cond_destroy
@@ -10253,6 +10254,7 @@
1025310254
#define __CRT_HAVE_KOS$pthread_barrierattr_init
1025410255
#define __CRT_HAVE_KOS$pthread_barrierattr_setpshared
1025510256
#define __CRT_HAVE_KOS$pthread_cancel
10257+
#define __CRT_HAVE_KOS$pthread_clockjoin_np
1025610258
#define __CRT_HAVE_KOS$pthread_cond_broadcast
1025710259
#define __CRT_HAVE_KOS$pthread_cond_clockwait
1025810260
#define __CRT_HAVE_KOS$pthread_cond_destroy
@@ -15133,6 +15135,7 @@
1513315135
#define __CRT_HAVE_DOS$pthread_barrierattr_init
1513415136
#define __CRT_HAVE_DOS$pthread_barrierattr_setpshared
1513515137
#define __CRT_HAVE_DOS$pthread_cancel
15138+
#define __CRT_HAVE_DOS$pthread_clockjoin_np
1513615139
#define __CRT_HAVE_DOS$pthread_cond_broadcast
1513715140
#define __CRT_HAVE_DOS$pthread_cond_clockwait
1513815141
#define __CRT_HAVE_DOS$pthread_cond_destroy
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* HASH CRC-32:0xc534cb55 */
2+
/* Copyright (c) 2019-2025 Griefer@Work *
3+
* *
4+
* This software is provided 'as-is', without any express or implied *
5+
* warranty. In no event will the authors be held liable for any damages *
6+
* arising from the use of this software. *
7+
* *
8+
* Permission is granted to anyone to use this software for any purpose, *
9+
* including commercial applications, and to alter it and redistribute it *
10+
* freely, subject to the following restrictions: *
11+
* *
12+
* 1. The origin of this software must not be misrepresented; you must not *
13+
* claim that you wrote the original software. If you use this software *
14+
* in a product, an acknowledgement (see the following) in the product *
15+
* documentation is required: *
16+
* Portions Copyright (c) 2019-2025 Griefer@Work *
17+
* 2. Altered source versions must be plainly marked as such, and must not be *
18+
* misrepresented as being the original software. *
19+
* 3. This notice may not be removed or altered from any source distribution. *
20+
*/
21+
#ifndef __local_pthread_clockjoin64_np_defined
22+
#define __local_pthread_clockjoin64_np_defined
23+
#include <__crt.h>
24+
#ifdef __CRT_HAVE_pthread_clockjoin_np
25+
#include <bits/types.h>
26+
#include <bits/crt/pthreadtypes.h>
27+
#include <bits/os/timespec.h>
28+
__NAMESPACE_LOCAL_BEGIN
29+
#ifndef __local___localdep_crt_pthread_clockjoin32_np_defined
30+
#define __local___localdep_crt_pthread_clockjoin32_np_defined
31+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,__localdep_crt_pthread_clockjoin32_np,(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct __timespec32 const *__abstime),pthread_clockjoin_np,(__self,__thread_return,__clock_id,__abstime))
32+
#endif /* !__local___localdep_crt_pthread_clockjoin32_np_defined */
33+
__LOCAL_LIBC(pthread_clockjoin64_np) __ATTR_IN_OPT(4) __ATTR_OUT_OPT(2) __errno_t
34+
__NOTHROW_RPC(__LIBCCALL __LIBC_LOCAL_NAME(pthread_clockjoin64_np))(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct __timespec64 const *__abstime) {
35+
struct __timespec32 __abstime32;
36+
if (!__abstime)
37+
return (__NAMESPACE_LOCAL_SYM __localdep_crt_pthread_clockjoin32_np)(__self, __thread_return, __clock_id, __NULLPTR);
38+
__abstime32.tv_sec = (__time32_t)__abstime->tv_sec;
39+
__abstime32.tv_nsec = __abstime->tv_nsec;
40+
return (__NAMESPACE_LOCAL_SYM __localdep_crt_pthread_clockjoin32_np)(__self, __thread_return, __clock_id, &__abstime32);
41+
}
42+
__NAMESPACE_LOCAL_END
43+
#ifndef __local___localdep_pthread_clockjoin64_np_defined
44+
#define __local___localdep_pthread_clockjoin64_np_defined
45+
#define __localdep_pthread_clockjoin64_np __LIBC_LOCAL_NAME(pthread_clockjoin64_np)
46+
#endif /* !__local___localdep_pthread_clockjoin64_np_defined */
47+
#else /* __CRT_HAVE_pthread_clockjoin_np */
48+
#undef __local_pthread_clockjoin64_np_defined
49+
#endif /* !__CRT_HAVE_pthread_clockjoin_np */
50+
#endif /* !__local_pthread_clockjoin64_np_defined */
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/* HASH CRC-32:0xded0766f */
2+
/* Copyright (c) 2019-2025 Griefer@Work *
3+
* *
4+
* This software is provided 'as-is', without any express or implied *
5+
* warranty. In no event will the authors be held liable for any damages *
6+
* arising from the use of this software. *
7+
* *
8+
* Permission is granted to anyone to use this software for any purpose, *
9+
* including commercial applications, and to alter it and redistribute it *
10+
* freely, subject to the following restrictions: *
11+
* *
12+
* 1. The origin of this software must not be misrepresented; you must not *
13+
* claim that you wrote the original software. If you use this software *
14+
* in a product, an acknowledgement (see the following) in the product *
15+
* documentation is required: *
16+
* Portions Copyright (c) 2019-2025 Griefer@Work *
17+
* 2. Altered source versions must be plainly marked as such, and must not be *
18+
* misrepresented as being the original software. *
19+
* 3. This notice may not be removed or altered from any source distribution. *
20+
*/
21+
#ifndef __local_pthread_clockjoin_np_defined
22+
#define __local_pthread_clockjoin_np_defined
23+
#include <__crt.h>
24+
#include <bits/types.h>
25+
#if defined(__CRT_HAVE_pthread_clockjoin64_np) || defined(__CRT_HAVE___pthread_clockjoin_np64) || defined(__CRT_HAVE_pthread_clockjoin_np)
26+
#include <bits/crt/pthreadtypes.h>
27+
#include <bits/os/timespec.h>
28+
__NAMESPACE_LOCAL_BEGIN
29+
#if !defined(__local___localdep_crt_pthread_clockjoin32_np_defined) && defined(__CRT_HAVE_pthread_clockjoin_np)
30+
#define __local___localdep_crt_pthread_clockjoin32_np_defined
31+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,__localdep_crt_pthread_clockjoin32_np,(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct __timespec32 const *__abstime),pthread_clockjoin_np,(__self,__thread_return,__clock_id,__abstime))
32+
#endif /* !__local___localdep_crt_pthread_clockjoin32_np_defined && __CRT_HAVE_pthread_clockjoin_np */
33+
#ifndef __local___localdep_pthread_clockjoin64_np_defined
34+
#define __local___localdep_pthread_clockjoin64_np_defined
35+
#if defined(__CRT_HAVE_pthread_clockjoin_np) && __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__
36+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,__localdep_pthread_clockjoin64_np,(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct __timespec64 const *__abstime),pthread_clockjoin_np,(__self,__thread_return,__clock_id,__abstime))
37+
#elif defined(__CRT_HAVE_pthread_clockjoin64_np)
38+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,__localdep_pthread_clockjoin64_np,(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct __timespec64 const *__abstime),pthread_clockjoin64_np,(__self,__thread_return,__clock_id,__abstime))
39+
#elif defined(__CRT_HAVE___pthread_clockjoin_np64)
40+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,__localdep_pthread_clockjoin64_np,(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct __timespec64 const *__abstime),__pthread_clockjoin_np64,(__self,__thread_return,__clock_id,__abstime))
41+
#elif defined(__CRT_HAVE_pthread_clockjoin_np)
42+
__NAMESPACE_LOCAL_END
43+
#include <libc/local/pthread/pthread_clockjoin64_np.h>
44+
__NAMESPACE_LOCAL_BEGIN
45+
#define __localdep_pthread_clockjoin64_np __LIBC_LOCAL_NAME(pthread_clockjoin64_np)
46+
#else /* ... */
47+
#undef __local___localdep_pthread_clockjoin64_np_defined
48+
#endif /* !... */
49+
#endif /* !__local___localdep_pthread_clockjoin64_np_defined */
50+
__LOCAL_LIBC(pthread_clockjoin_np) __ATTR_IN_OPT(4) __ATTR_OUT_OPT(2) __errno_t
51+
__NOTHROW_RPC(__LIBCCALL __LIBC_LOCAL_NAME(pthread_clockjoin_np))(__pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec const *__abstime) {
52+
#ifdef __CRT_HAVE_pthread_clockjoin_np
53+
struct __timespec32 __abstime32;
54+
if (!__abstime)
55+
return (__NAMESPACE_LOCAL_SYM __localdep_crt_pthread_clockjoin32_np)(__self, __thread_return, __clock_id, __NULLPTR);
56+
__abstime32.tv_sec = (__time32_t)__abstime->tv_sec;
57+
__abstime32.tv_nsec = __abstime->tv_nsec;
58+
return (__NAMESPACE_LOCAL_SYM __localdep_crt_pthread_clockjoin32_np)(__self, __thread_return, __clock_id, &__abstime32);
59+
#else /* __CRT_HAVE_pthread_clockjoin_np */
60+
struct __timespec64 __abstime64;
61+
if (!__abstime)
62+
return (__NAMESPACE_LOCAL_SYM __localdep_pthread_clockjoin64_np)(__self, __thread_return, __clock_id, __NULLPTR);
63+
__abstime64.tv_sec = (__time64_t)__abstime->tv_sec;
64+
__abstime64.tv_nsec = __abstime->tv_nsec;
65+
return (__NAMESPACE_LOCAL_SYM __localdep_pthread_clockjoin64_np)(__self, __thread_return, __clock_id, &__abstime32);
66+
#endif /* !__CRT_HAVE_pthread_clockjoin_np */
67+
}
68+
__NAMESPACE_LOCAL_END
69+
#ifndef __local___localdep_pthread_clockjoin_np_defined
70+
#define __local___localdep_pthread_clockjoin_np_defined
71+
#define __localdep_pthread_clockjoin_np __LIBC_LOCAL_NAME(pthread_clockjoin_np)
72+
#endif /* !__local___localdep_pthread_clockjoin_np_defined */
73+
#else /* __CRT_HAVE_pthread_clockjoin64_np || __CRT_HAVE___pthread_clockjoin_np64 || __CRT_HAVE_pthread_clockjoin_np */
74+
#undef __local_pthread_clockjoin_np_defined
75+
#endif /* !__CRT_HAVE_pthread_clockjoin64_np && !__CRT_HAVE___pthread_clockjoin_np64 && !__CRT_HAVE_pthread_clockjoin_np */
76+
#endif /* !__local_pthread_clockjoin_np_defined */

kos/include/pthread.h

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* HASH CRC-32:0xe4d54e37 */
1+
/* HASH CRC-32:0x2172b8ec */
22
/* Copyright (c) 2019-2025 Griefer@Work *
33
* *
44
* This software is provided 'as-is', without any express or implied *
@@ -661,6 +661,11 @@ typedef __pthread_barrierattr_t pthread_barrierattr_t;
661661
typedef __size_t size_t;
662662
#endif /* !__size_t_defined */
663663

664+
struct timespec;
665+
#ifdef __USE_TIME64
666+
struct timespec64;
667+
#endif /* __USE_TIME64 */
668+
664669
/* >> pthread_create(3)
665670
* Create a new thread, starting with execution of `start_routine'
666671
* getting passed `arg'. Creation attributed come from `attr'. The new
@@ -718,7 +723,6 @@ __CDECLARE(__ATTR_OUT_OPT(2),__errno_t,__NOTHROW_NCX,pthread_tryjoin_np,(pthread
718723
* @return: EBUSY: The thread has yet to terminate */
719724
__CREDIRECT(__ATTR_OUT_OPT(2),__errno_t,__NOTHROW_NCX,pthread_tryjoin_np,(pthread_t __self, void **__thread_return),pthread_peekjoin_np,(__self,__thread_return))
720725
#endif /* ... */
721-
struct timespec;
722726
#ifndef __pthread_timedjoin_np_defined
723727
#define __pthread_timedjoin_np_defined
724728
#if defined(__CRT_HAVE_pthread_timedjoin_np) && (!defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__)
@@ -762,6 +766,49 @@ __NAMESPACE_LOCAL_USING_OR_IMPL(pthread_timedjoin_np, __FORCELOCAL __ATTR_ARTIFI
762766
#undef __pthread_timedjoin_np_defined
763767
#endif /* !... */
764768
#endif /* !__pthread_timedjoin_np_defined */
769+
#ifndef __pthread_clockjoin_np_defined
770+
#define __pthread_clockjoin_np_defined
771+
#if defined(__CRT_HAVE_pthread_clockjoin_np) && (!defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__)
772+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
773+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
774+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
775+
* @return: EOK: Success
776+
* @return: EINVAL: The given `abstime' is invalid
777+
* @return: EINVAL: Invalid/unsupported `clock_id'
778+
* @return: ETIMEDOUT: The given `abstime' has expired */
779+
__CDECLARE(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,pthread_clockjoin_np,(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec const *__abstime),(__self,__thread_return,__clock_id,__abstime))
780+
#elif defined(__CRT_HAVE_pthread_clockjoin64_np) && (defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__)
781+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
782+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
783+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
784+
* @return: EOK: Success
785+
* @return: EINVAL: The given `abstime' is invalid
786+
* @return: EINVAL: Invalid/unsupported `clock_id'
787+
* @return: ETIMEDOUT: The given `abstime' has expired */
788+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,pthread_clockjoin_np,(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec const *__abstime),pthread_clockjoin64_np,(__self,__thread_return,__clock_id,__abstime))
789+
#elif defined(__CRT_HAVE___pthread_clockjoin_np64) && (defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__)
790+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
791+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
792+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
793+
* @return: EOK: Success
794+
* @return: EINVAL: The given `abstime' is invalid
795+
* @return: EINVAL: Invalid/unsupported `clock_id'
796+
* @return: ETIMEDOUT: The given `abstime' has expired */
797+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,pthread_clockjoin_np,(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec const *__abstime),__pthread_clockjoin_np64,(__self,__thread_return,__clock_id,__abstime))
798+
#elif defined(__CRT_HAVE_pthread_clockjoin64_np) || defined(__CRT_HAVE___pthread_clockjoin_np64) || defined(__CRT_HAVE_pthread_clockjoin_np)
799+
#include <libc/local/pthread/pthread_clockjoin_np.h>
800+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
801+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
802+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
803+
* @return: EOK: Success
804+
* @return: EINVAL: The given `abstime' is invalid
805+
* @return: EINVAL: Invalid/unsupported `clock_id'
806+
* @return: ETIMEDOUT: The given `abstime' has expired */
807+
__NAMESPACE_LOCAL_USING_OR_IMPL(pthread_clockjoin_np, __FORCELOCAL __ATTR_ARTIFICIAL __ATTR_IN_OPT(4) __ATTR_OUT_OPT(2) __errno_t __NOTHROW_RPC(__LIBCCALL pthread_clockjoin_np)(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec const *__abstime) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(pthread_clockjoin_np))(__self, __thread_return, __clock_id, __abstime); })
808+
#else /* ... */
809+
#undef __pthread_clockjoin_np_defined
810+
#endif /* !... */
811+
#endif /* !__pthread_clockjoin_np_defined */
765812
#ifdef __USE_TIME64
766813
#ifndef __pthread_timedjoin64_np_defined
767814
#define __pthread_timedjoin64_np_defined
@@ -806,6 +853,49 @@ __NAMESPACE_LOCAL_USING_OR_IMPL(pthread_timedjoin64_np, __FORCELOCAL __ATTR_ARTI
806853
#undef __pthread_timedjoin64_np_defined
807854
#endif /* !... */
808855
#endif /* !__pthread_timedjoin64_np_defined */
856+
#ifndef __pthread_clockjoin64_np_defined
857+
#define __pthread_clockjoin64_np_defined
858+
#if defined(__CRT_HAVE_pthread_clockjoin_np) && __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__
859+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
860+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
861+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
862+
* @return: EOK: Success
863+
* @return: EINVAL: The given `abstime' is invalid
864+
* @return: EINVAL: Invalid/unsupported `clock_id'
865+
* @return: ETIMEDOUT: The given `abstime' has expired */
866+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,pthread_clockjoin64_np,(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec64 const *__abstime),pthread_clockjoin_np,(__self,__thread_return,__clock_id,__abstime))
867+
#elif defined(__CRT_HAVE_pthread_clockjoin64_np)
868+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
869+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
870+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
871+
* @return: EOK: Success
872+
* @return: EINVAL: The given `abstime' is invalid
873+
* @return: EINVAL: Invalid/unsupported `clock_id'
874+
* @return: ETIMEDOUT: The given `abstime' has expired */
875+
__CDECLARE(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,pthread_clockjoin64_np,(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec64 const *__abstime),(__self,__thread_return,__clock_id,__abstime))
876+
#elif defined(__CRT_HAVE___pthread_clockjoin_np64)
877+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
878+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
879+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
880+
* @return: EOK: Success
881+
* @return: EINVAL: The given `abstime' is invalid
882+
* @return: EINVAL: Invalid/unsupported `clock_id'
883+
* @return: ETIMEDOUT: The given `abstime' has expired */
884+
__CREDIRECT(__ATTR_IN_OPT(4) __ATTR_OUT_OPT(2),__errno_t,__NOTHROW_RPC,pthread_clockjoin64_np,(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec64 const *__abstime),__pthread_clockjoin_np64,(__self,__thread_return,__clock_id,__abstime))
885+
#elif defined(__CRT_HAVE_pthread_clockjoin_np)
886+
#include <libc/local/pthread/pthread_clockjoin64_np.h>
887+
/* >> pthread_clockjoin_np(3), pthread_clockjoin64_np(3)
888+
* Same as `pthread_timedjoin_np(3)', but the given `abstime' is relative to `clock_id',
889+
* whereas when using `pthread_timedjoin_np(3)', it is always relative to `CLOCK_REALTIME'.
890+
* @return: EOK: Success
891+
* @return: EINVAL: The given `abstime' is invalid
892+
* @return: EINVAL: Invalid/unsupported `clock_id'
893+
* @return: ETIMEDOUT: The given `abstime' has expired */
894+
__NAMESPACE_LOCAL_USING_OR_IMPL(pthread_clockjoin64_np, __FORCELOCAL __ATTR_ARTIFICIAL __ATTR_IN_OPT(4) __ATTR_OUT_OPT(2) __errno_t __NOTHROW_RPC(__LIBCCALL pthread_clockjoin64_np)(pthread_t __self, void **__thread_return, __clockid_t __clock_id, struct timespec64 const *__abstime) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(pthread_clockjoin64_np))(__self, __thread_return, __clock_id, __abstime); })
895+
#else /* ... */
896+
#undef __pthread_clockjoin64_np_defined
897+
#endif /* !... */
898+
#endif /* !__pthread_clockjoin64_np_defined */
809899
#endif /* __USE_TIME64 */
810900
#endif /* __USE_GNU */
811901
#ifdef __CRT_HAVE_pthread_detach

0 commit comments

Comments
 (0)