[libc-commits] [libc] [libc] Implement pthread_getthreadid_np and pthread_getunique_np. (PR #197027)

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Mon May 11 14:51:35 PDT 2026


================
@@ -1,22 +1,21 @@
-//===-- Internal header for cnd_timedwait -----------------------*- C++ -*-===//
+//===- Implementation header for pthread_getunique_np function --*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_SRC_THREADS_CND_TIMEDWAIT_H
-#define LLVM_LIBC_SRC_THREADS_CND_TIMEDWAIT_H
+#ifndef LLVM_LIBC_SRC_PTHREAD_PTHREAD_GETUNIQUE_NP_H
+#define LLVM_LIBC_SRC_PTHREAD_PTHREAD_GETUNIQUE_NP_H
 
 #include "src/__support/macros/config.h"
-#include <threads.h>
+#include <pthread.h>
 
 namespace LIBC_NAMESPACE_DECL {
 
-int cnd_timedwait(cnd_t *__restrict cond, mtx_t *__restrict mutex,
-                  const struct timespec *__restrict time_point);
+int pthread_getunique_np(pthread_t *thread, pthread_id_np_t *id);
----------------
vonosmas wrote:

Done. I've also const-qualified the first argument.

https://github.com/llvm/llvm-project/pull/197027


More information about the libc-commits mailing list