diff options
author | Florian Weimer <fweimer@redhat.com> | 2025-03-12 10:16:31 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-03-12 10:23:35 +0100 |
commit | 74d463c50bb1096efef47022405c7db33f83fb5a (patch) | |
tree | 7a61f4db59c8bd43d1213d6d137aff51fff0588d /sysdeps/nptl/pthread.h | |
parent | d604f9c500570e80febfcc6a52b63a002b466f35 (diff) | |
download | glibc-74d463c50bb1096efef47022405c7db33f83fb5a.zip glibc-74d463c50bb1096efef47022405c7db33f83fb5a.tar.gz glibc-74d463c50bb1096efef47022405c7db33f83fb5a.tar.bz2 |
Linux: Add the pthread_gettid_np function (bug 27880)
Current Bionic has this function, with enhanced error checking
(the undefined case terminates the process).
Reviewed-by: Joseph Myers <josmyers@redhat.com>
Diffstat (limited to 'sysdeps/nptl/pthread.h')
-rw-r--r-- | sysdeps/nptl/pthread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h index 050b4ab..b4d10a3 100644 --- a/sysdeps/nptl/pthread.h +++ b/sysdeps/nptl/pthread.h @@ -1317,6 +1317,11 @@ extern int pthread_getcpuclockid (pthread_t __thread_id, __THROW __nonnull ((2)); #endif +#ifdef __USE_GNU +/* Return the Linux TID for THREAD_ID. Returns -1 on failure. */ +extern pid_t pthread_gettid_np (pthread_t __thread_id); +#endif + /* Install handlers to be called when a new process is created with FORK. The PREPARE handler is called in the parent process just before performing |