|
1 | | -/* HASH CRC-32:0xe83b08bb */ |
| 1 | +/* HASH CRC-32:0xe4d54e37 */ |
2 | 2 | /* Copyright (c) 2019-2025 Griefer@Work * |
3 | 3 | * * |
4 | 4 | * This software is provided 'as-is', without any express or implied * |
@@ -1803,6 +1803,86 @@ __NAMESPACE_LOCAL_USING_OR_IMPL(pthread_mutex_reltimedlock64_np, __FORCELOCAL __ |
1803 | 1803 | #endif /* ... */ |
1804 | 1804 | #endif /* __USE_TIME64 */ |
1805 | 1805 | #endif /* __USE_SOLARIS */ |
| 1806 | +#ifdef __USE_GNU |
| 1807 | +#if defined(__CRT_HAVE_pthread_mutex_clocklock) && (!defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__) |
| 1808 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1809 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1810 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1811 | + * @return: EOK: Success |
| 1812 | + * @return: EINVAL: The given `abstime' is invalid |
| 1813 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1814 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1815 | +__CDECLARE(__ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1),__errno_t,__NOTHROW_RPC,pthread_mutex_clocklock,(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec const *__restrict __abstime),(__self,__clock_id,__abstime)) |
| 1816 | +#elif defined(__CRT_HAVE_pthread_mutex_clocklock64) && (defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__) |
| 1817 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1818 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1819 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1820 | + * @return: EOK: Success |
| 1821 | + * @return: EINVAL: The given `abstime' is invalid |
| 1822 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1823 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1824 | +__CREDIRECT(__ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1),__errno_t,__NOTHROW_RPC,pthread_mutex_clocklock,(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec const *__restrict __abstime),pthread_mutex_clocklock64,(__self,__clock_id,__abstime)) |
| 1825 | +#elif defined(__CRT_HAVE___pthread_mutex_clocklock64) && (defined(__USE_TIME_BITS64) || __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__) |
| 1826 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1827 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1828 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1829 | + * @return: EOK: Success |
| 1830 | + * @return: EINVAL: The given `abstime' is invalid |
| 1831 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1832 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1833 | +__CREDIRECT(__ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1),__errno_t,__NOTHROW_RPC,pthread_mutex_clocklock,(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec const *__restrict __abstime),__pthread_mutex_clocklock64,(__self,__clock_id,__abstime)) |
| 1834 | +#elif defined(__CRT_HAVE_pthread_mutex_clocklock64) || defined(__CRT_HAVE___pthread_mutex_clocklock64) || defined(__CRT_HAVE_pthread_mutex_clocklock) |
| 1835 | +#include <libc/local/pthread/pthread_mutex_clocklock.h> |
| 1836 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1837 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1838 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1839 | + * @return: EOK: Success |
| 1840 | + * @return: EINVAL: The given `abstime' is invalid |
| 1841 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1842 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1843 | +__NAMESPACE_LOCAL_USING_OR_IMPL(pthread_mutex_clocklock, __FORCELOCAL __ATTR_ARTIFICIAL __ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1) __errno_t __NOTHROW_RPC(__LIBCCALL pthread_mutex_clocklock)(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec const *__restrict __abstime) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(pthread_mutex_clocklock))(__self, __clock_id, __abstime); }) |
| 1844 | +#endif /* ... */ |
| 1845 | +#ifdef __USE_TIME64 |
| 1846 | +#if defined(__CRT_HAVE_pthread_mutex_clocklock) && __SIZEOF_TIME32_T__ == __SIZEOF_TIME64_T__ |
| 1847 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1848 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1849 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1850 | + * @return: EOK: Success |
| 1851 | + * @return: EINVAL: The given `abstime' is invalid |
| 1852 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1853 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1854 | +__CREDIRECT(__ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1),__errno_t,__NOTHROW_RPC,pthread_mutex_clocklock64,(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec64 const *__restrict __abstime),pthread_mutex_clocklock,(__self,__clock_id,__abstime)) |
| 1855 | +#elif defined(__CRT_HAVE_pthread_mutex_clocklock64) |
| 1856 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1857 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1858 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1859 | + * @return: EOK: Success |
| 1860 | + * @return: EINVAL: The given `abstime' is invalid |
| 1861 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1862 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1863 | +__CDECLARE(__ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1),__errno_t,__NOTHROW_RPC,pthread_mutex_clocklock64,(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec64 const *__restrict __abstime),(__self,__clock_id,__abstime)) |
| 1864 | +#elif defined(__CRT_HAVE___pthread_mutex_clocklock64) |
| 1865 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1866 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1867 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1868 | + * @return: EOK: Success |
| 1869 | + * @return: EINVAL: The given `abstime' is invalid |
| 1870 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1871 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1872 | +__CREDIRECT(__ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1),__errno_t,__NOTHROW_RPC,pthread_mutex_clocklock64,(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec64 const *__restrict __abstime),__pthread_mutex_clocklock64,(__self,__clock_id,__abstime)) |
| 1873 | +#elif defined(__CRT_HAVE_pthread_mutex_clocklock) |
| 1874 | +#include <libc/local/pthread/pthread_mutex_clocklock64.h> |
| 1875 | +/* >> pthread_mutex_clocklock(3), pthread_mutex_clocklock64(3) |
| 1876 | + * Same as `pthread_mutex_timedwait(3)', but the given `abstime' is relative to `clock_id', |
| 1877 | + * whereas when using `pthread_mutex_timedwait(3)', it is always relative to `CLOCK_REALTIME'. |
| 1878 | + * @return: EOK: Success |
| 1879 | + * @return: EINVAL: The given `abstime' is invalid |
| 1880 | + * @return: EINVAL: Invalid/unsupported `clock_id' |
| 1881 | + * @return: ETIMEDOUT: The given `abstime' has expired */ |
| 1882 | +__NAMESPACE_LOCAL_USING_OR_IMPL(pthread_mutex_clocklock64, __FORCELOCAL __ATTR_ARTIFICIAL __ATTR_WUNUSED __ATTR_IN(3) __ATTR_INOUT(1) __errno_t __NOTHROW_RPC(__LIBCCALL pthread_mutex_clocklock64)(pthread_mutex_t *__restrict __self, __clockid_t __clock_id, struct timespec64 const *__restrict __abstime) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(pthread_mutex_clocklock64))(__self, __clock_id, __abstime); }) |
| 1883 | +#endif /* ... */ |
| 1884 | +#endif /* __USE_TIME64 */ |
| 1885 | +#endif /* __USE_GNU */ |
1806 | 1886 | #ifdef __CRT_HAVE_pthread_mutex_unlock |
1807 | 1887 | /* >> pthread_mutex_unlock(3) |
1808 | 1888 | * Unlock the given mutex `self' |
|
0 commit comments