This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Add getcpu wrapper
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 5 Dec 2018 08:04:20 -0800
- Subject: Re: RFC: Add getcpu wrapper
- References: <CAMe9rOpcy16tREX8Gb0qYPXXc__Vzykj2c=M20aBOn4p0gUBGw@mail.gmail.com> <87pnuggf5z.fsf@oldenburg2.str.redhat.com> <CAMe9rOqEeSY7H-MQybk=wuR4aK4juTNj5dGK1CvjYkxExYOAuw@mail.gmail.com> <87lg54gejo.fsf@oldenburg2.str.redhat.com> <CAKCAbMjTp1benVkeNd8kv=fpxOmqORn+2jPZ725s4zpysHiDhw@mail.gmail.com>
On Wed, Dec 5, 2018 at 8:00 AM Zack Weinberg <zackw@panix.com> wrote:
>
> On Wed, Dec 5, 2018 at 10:49 AM Florian Weimer <fweimer@redhat.com> wrote:
> >
> > Ah, so you want to pass a non-null second argument to getcpu?
> >
> > I think we can expose getcpu (with two arguments), under that name. Add
> > it to <sched.h> or <unistd.h>; I do not have a strong preference.
>
> What's the third argument for? Is there a concrete reason not to
> expose it as well?
>
> zw
The third argument to this system call is nowadays unused, and should
be specified as NULL unless portability to Linux 2.6.23 or earlier is
required (see NOTES).
--
H.J.