[PATCH] Linux: Add gettid system call wrapper [BZ #6399]
Florian Weimer
fweimer@redhat.com
Fri Dec 7 13:28:00 GMT 2018
* Florian Weimer:
> This commit adds gettid to <unistd.h> on Linux, and not to the
> kernel-independent GNU API.
>
> 2018-12-05 Florian Weimer <fweimer@redhat.com>
>
> [BZ #6399]
> Linux: Add gettid system call wrapper.
> * posix/Makefile (headers): Add bits/unistd_ext.h.
> * posix/bits/unistd_ext.h: New file.
> * posix/unistd.h: Include it.
> * sysdeps/unix/sysv/linux/Makefile [subdir == misc] (tests): Add
> tst-gettid.
> (tst-gettid): Link with $(shared-thread-library).
> * sysdeps/unix/sysv/linux/Version (GLIBC_2.29): Export gettid.
> * sysdeps/unix/sysv/linux/bits/unistd_ext.h: New file.
Any comments on the technical approach chosen here? Is the declaration
in <unistd.h> reasonable? Is the mechanism to make <unistd.h>
extensible okay?
Or should the prototype go into <sched.h>?
Thanks,
Florian
More information about the Libc-alpha
mailing list