This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Add gettid system call wrapper [BZ #6399]
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 07 Dec 2018 09:48:20 +0100
- Subject: Re: [PATCH] Linux: Add gettid system call wrapper [BZ #6399]
- References: <87ftvc2qjo.fsf@oldenburg2.str.redhat.com>
* 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