This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: support for calling Linux syscalls directly
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: Michael Kerrisk <mtk dot manpages at gmail dot com>
- Cc: "H. Peter Anvin" <hpa at zytor dot com>, Rich Felker <dalias at aerifal dot cx>, libc-alpha at sourceware dot org, "Joseph S. Myers" <joseph at codesourcery dot com>, Roland McGrath <roland at hack dot frob dot com>, keescook at chromium dot org
- Date: Wed, 13 Feb 2013 10:47:11 -0600
- Subject: Re: support for calling Linux syscalls directly
- References: <201301242314.47793.vapier@gentoo.org> <5109A662.7050101@zytor.com> <20130131073057.GQ20323@brightrain.aerifal.cx> <Pine.LNX.4.64.1301312309490.13481@digraph.polyomino.org.uk> <510AFCF3.6080109@zytor.com> <20130131233654.GR20323@brightrain.aerifal.cx> <CALxWeYqKWT=ww+EY4VWgfYaW62_=VGuHZqcGzbxykUnnhf1aAA@mail.gmail.com> <510F2E59.1050302@zytor.com> <CALxWeYqMNMVGz_SO5Ca_Z-6DMp718PO_2WpwWFr1k8kziU5YrA@mail.gmail.com>
- Reply-to: munroesj at us dot ibm dot com
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().