|
1 | | -/* HASH CRC-32:0xe4d54e37 */ |
| 1 | +/* HASH CRC-32:0x2172b8ec */ |
2 | 2 | /* Copyright (c) 2019-2025 Griefer@Work * |
3 | 3 | * * |
4 | 4 | * This software is provided 'as-is', without any express or implied * |
@@ -661,6 +661,11 @@ typedef __pthread_barrierattr_t pthread_barrierattr_t; |
661 | 661 | typedef __size_t size_t; |
662 | 662 | #endif /* !__size_t_defined */ |
663 | 663 |
|
| 664 | +struct timespec; |
| 665 | +#ifdef __USE_TIME64 |
| 666 | +struct timespec64; |
| 667 | +#endif /* __USE_TIME64 */ |
| 668 | + |
664 | 669 | /* >> pthread_create(3) |
665 | 670 | * Create a new thread, starting with execution of `start_routine' |
666 | 671 | * 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 |
718 | 723 | * @return: EBUSY: The thread has yet to terminate */ |
719 | 724 | __CREDIRECT(__ATTR_OUT_OPT(2),__errno_t,__NOTHROW_NCX,pthread_tryjoin_np,(pthread_t __self, void **__thread_return),pthread_peekjoin_np,(__self,__thread_return)) |
720 | 725 | #endif /* ... */ |
721 | | -struct timespec; |
722 | 726 | #ifndef __pthread_timedjoin_np_defined |
723 | 727 | #define __pthread_timedjoin_np_defined |
724 | 728 | #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 |
762 | 766 | #undef __pthread_timedjoin_np_defined |
763 | 767 | #endif /* !... */ |
764 | 768 | #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 */ |
765 | 812 | #ifdef __USE_TIME64 |
766 | 813 | #ifndef __pthread_timedjoin64_np_defined |
767 | 814 | #define __pthread_timedjoin64_np_defined |
@@ -806,6 +853,49 @@ __NAMESPACE_LOCAL_USING_OR_IMPL(pthread_timedjoin64_np, __FORCELOCAL __ATTR_ARTI |
806 | 853 | #undef __pthread_timedjoin64_np_defined |
807 | 854 | #endif /* !... */ |
808 | 855 | #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 */ |
809 | 899 | #endif /* __USE_TIME64 */ |
810 | 900 | #endif /* __USE_GNU */ |
811 | 901 | #ifdef __CRT_HAVE_pthread_detach |
|
0 commit comments