|
1 | | -/* HASH CRC-32:0x5ecc7c65 */ |
| 1 | +/* HASH CRC-32:0x825f2384 */ |
2 | 2 | /* Copyright (c) 2019-2025 Griefer@Work * |
3 | 3 | * * |
4 | 4 | * This software is provided 'as-is', without any express or implied * |
@@ -1258,28 +1258,32 @@ __CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t _ |
1258 | 1258 | #endif /* !... */ |
1259 | 1259 | #endif /* !__pthread_setname_np_defined */ |
1260 | 1260 | #endif /* __USE_GNU */ |
1261 | | -#ifdef __USE_KOS |
| 1261 | +#if defined(__USE_KOS) || defined(__USE_GNU) |
1262 | 1262 | #ifndef __pthread_gettid_np_defined |
1263 | 1263 | #define __pthread_gettid_np_defined |
1264 | 1264 | #ifdef __CRT_HAVE_pthread_gettid_np |
1265 | 1265 | /* >> pthread_gettid_np(3) |
1266 | 1266 | * Return the TID of the given `self'. |
1267 | 1267 | * If `self' has already terminated, 0 is returned |
1268 | 1268 | * @return: * : The TID of the given thread |
1269 | | - * @return: 0 : The given `self' has already terminated */ |
| 1269 | + * @return: 0 : The given `self' has already terminated (KOS) |
| 1270 | + * @return: -1: The given `self' has already terminated (GLibc) */ |
1270 | 1271 | __CDECLARE(__ATTR_PURE __ATTR_WUNUSED,__pid_t,__NOTHROW_NCX,pthread_gettid_np,(pthread_t __self),(__self)) |
1271 | 1272 | #elif defined(__CRT_HAVE_pthread_getunique_np) || defined(__CRT_HAVE_pthread_threadid_np) |
1272 | 1273 | #include <libc/local/pthread/pthread_gettid_np.h> |
1273 | 1274 | /* >> pthread_gettid_np(3) |
1274 | 1275 | * Return the TID of the given `self'. |
1275 | 1276 | * If `self' has already terminated, 0 is returned |
1276 | 1277 | * @return: * : The TID of the given thread |
1277 | | - * @return: 0 : The given `self' has already terminated */ |
| 1278 | + * @return: 0 : The given `self' has already terminated (KOS) |
| 1279 | + * @return: -1: The given `self' has already terminated (GLibc) */ |
1278 | 1280 | __NAMESPACE_LOCAL_USING_OR_IMPL(pthread_gettid_np, __FORCELOCAL __ATTR_ARTIFICIAL __ATTR_PURE __ATTR_WUNUSED __pid_t __NOTHROW_NCX(__LIBCCALL pthread_gettid_np)(pthread_t __self) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(pthread_gettid_np))(__self); }) |
1279 | 1281 | #else /* ... */ |
1280 | 1282 | #undef __pthread_gettid_np_defined |
1281 | 1283 | #endif /* !... */ |
1282 | 1284 | #endif /* !__pthread_gettid_np_defined */ |
| 1285 | +#endif /* __USE_KOS || __USE_GNU */ |
| 1286 | +#ifdef __USE_KOS |
1283 | 1287 | #if !defined(__pthread_getpidfd_np_defined) && defined(__CRT_HAVE_pthread_getpidfd_np) |
1284 | 1288 | #define __pthread_getpidfd_np_defined |
1285 | 1289 | /* >> pthread_getpidfd_np(3) |
|
0 commit comments