From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3FF741F461 for ; Thu, 27 Jun 2019 16:03:03 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type :content-transfer-encoding; q=dns; s=default; b=jKTv0ZZIll4/I9/M eEpWH6xpIc/drSpLbbvTObLG/7VDrBnaJs/WXT5r22KvD4W6dwYqIuX/rXFAzud5 WdVgKRU5KD2f06i3V9yMBtBHrNiIo8w0Cjk9yKqvTtuoyV1gmkVKPMPv/igrCHq4 nIWaqbeYhxOSzDrK7JYgmWgOeX0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type :content-transfer-encoding; s=default; bh=RENuvFfsTX+aW6SeCt1tVk 89TOA=; b=sgsXGn1jZyRem/BjdTMbVnj3NYoqhnBC87iqPejL88BEtu27nGQvve 2FAn7aROOAZsatIkQcRxfpbW7wco4snUpTVshgMoCbGBndJfOoTuD6V2dpN1EY3E ujzAbZJKVPkX0/D3kI54RgDzwBpE/JcfKwuXLm7NeB4Dnsbqdgosk= Received: (qmail 123284 invoked by alias); 27 Jun 2019 16:03:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 123263 invoked by uid 89); 27 Jun 2019 16:03:00 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mailbackend.panix.com MIME-Version: 1.0 References: In-Reply-To: From: Zack Weinberg Date: Thu, 27 Jun 2019 12:02:46 -0400 Message-ID: Subject: Re: syscall wrappers policy (was re: glibc at the Toolchains microconference) To: DJ Delorie Cc: "Carlos O'Donell" , GNU C Library Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 27, 2019 at 11:49 AM DJ Delorie wrote: > > Zack Weinberg writes: > > First, I think we need a definition of =E2=80=9Csyscall wrapper.=E2=80= =9D 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