This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]