1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Linux: Add gettid system call wrapper [BZ #6399]

This commit adds gettid to <unistd.h> on Linux, and not to the
kernel-independent GNU API.

gettid is now supportable on Linux because too many things assume a
1:1 mapping between libpthread threads and kernel threads.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Florian Weimer
2019-02-02 15:17:02 +01:00
parent f289e656ec
commit 1d0fc21382
40 changed files with 388 additions and 9 deletions

View File

@ -43,12 +43,6 @@
terminator. */
#define TASK_COMM_LEN 16
long
gettid (void)
{
return syscall(__NR_gettid);
}
/* On Linux we can read this task's name from /proc. */
int
get_self_comm (long tid, char *buf, size_t len)