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: syscall wrappers policy (was re: glibc at the Toolchains microconference)


On Thu, Jun 27, 2019 at 11:49 AM DJ Delorie <dj@redhat.com> wrote:
>
> Zack Weinberg <zackw@panix.com> writes:
> > First, I think we need a definition of “syscall wrapper.”  Proposed:
>
> I offer alternate wording, not because I think mine is better, but to
> stir the pot a bit and get people thinking :-)
>
> "A syscall wrapper is a function whose primary (preferably sole) purpose
> is to provide a minimal C-callable interface to a kernel function."
>
> I think that explains why glibc has them (C-callable), limits its scope
> (primary/sole purpose) and defines its purpose (kernel function).

I like this.  "Minimal interface" is better than "doesn't do any
nontrivial work itself."

> > Second, I think we need to talk a bit about the rationale for the
> > policy.
>
> I think definining it as a "C API" makes it clear that the C library is
> the right place for C functions.  That also keeps us from trying to be
> the ONLY kernel API library, when other languages need non-C wrappers.

Yeah.  I feel like there's a need, nowadays, for a language-agnostic
kernel API library and a dynamic loader completely decoupled from the
C library, but that's a big can of worms and we shouldn't let it get
in the way of anything else.

zw


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