summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/gettid.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/gettid.c')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/gettid.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/gettid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/gettid.c
new file mode 100644
index 000000000..80c2ed80f
--- /dev/null
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/gettid.c
@@ -0,0 +1,13 @@
+/* Copyright (C) 2025 Waldemar Brodkorb <wbx@uclibc-ng.org> */
+
+#include <unistd.h>
+#include <tls.h>
+#include <sysdep.h>
+
+pid_t
+gettid (void)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ pid_t result = INTERNAL_SYSCALL (gettid, err, 0);
+ return result;
+}