support for calling Linux syscalls directly
Steven Munroe
munroesj@linux.vnet.ibm.com
Wed Feb 13 16:40:00 GMT 2013
On Mon, 2013-02-04 at 05:19 +0100, Michael Kerrisk wrote:
> On Mon, Feb 4, 2013 at 4:43 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> > On 02/03/2013 07:35 PM, Michael Kerrisk wrote:
> >>
> >>
> >> So, below my (expanded) list of syscalls that don't have ful glibc
> >> support, categorized with respect as to whether they should be in
> >> glibc.
> >>
> >
> > From the the looks of it you're assuming library == libc, as opposed to
> > making a libc/libinux distinction.
>
> Yes, I am more or less doing that. gettid() is an example of why.
> There are by now many glibc syscall wrappers that employ kernel thread
> IDs. Thus, it's quite strange that gettid() is not in glibc.
>
This is an example of where we should NOT be doing a syscall but should
have an API. The TID is cached int he TCB.
I have had to do this the hard way several times and is stupid not to
have Linux API for gettid().
More information about the Libc-alpha
mailing list