From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0422B898 for ; Fri, 12 Aug 2016 06:24:01 +0000 (UTC) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CE5ECFC for ; Fri, 12 Aug 2016 06:23:59 +0000 (UTC) Received: by mail-ua0-f169.google.com with SMTP id 74so28180475uau.0 for ; Thu, 11 Aug 2016 23:23:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160812090706-mutt-send-email-mst@kernel.org> References: <18158a39-1297-7368-3c0e-3e9b3ce2c3ab@suse.com> <20160811154429.GB4134@mwanda> <20160812040155.kvw5322jqshtmljb@x> <20160812052919.GB2289@p183.telecom.by> <20160812083512-mutt-send-email-mst@kernel.org> <20160812090706-mutt-send-email-mst@kernel.org> From: Matthew Wilcox Date: Fri, 12 Aug 2016 02:23:57 -0400 Message-ID: To: "Michael S. Tsirkin" Content-Type: multipart/alternative; boundary=001a114dc9e482072d0539d9edcd Cc: Dan Carpenter , "ksummit-discuss@lists.linuxfoundation.org" Subject: Re: [Ksummit-discuss] [CORE TOPIC] More useful types in the linux kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --001a114dc9e482072d0539d9edcd Content-Type: text/plain; charset=UTF-8 On Fri, Aug 12, 2016 at 2:09 AM, Michael S. Tsirkin wrote: > I guess > typedef void * errno_t; > is one way, maybe marking it noderef for good measure. > > This means the values are 64 bit unfortunately, which is often > overkill. > s/64-bit/native word size/ Does anyone know of an ABI where that's *inefficient*?! Or at least, less efficient than returning a 32-bit int? Pretty much every ABI I ever saw says something along the lines of 'register FOO contains the return value if the type is small enough, otherwise for returning aggregates, register FOO contains ...' I can't believe anyone would deliberately design an ABI where calling void *foo(void) is less efficient than calling int bar(void); (and if you have some weird DSP or the CDC6600 in mind where Linux won't run anyway, then comp.arch.necrophilia is --> that way) --001a114dc9e482072d0539d9edcd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Aug 12, 2016 at 2:09 AM, Michael S. Tsirkin <mst@red= hat.com> wrote:
I guess
typedef void * errno_t;
is one way, maybe marking it noderef for good measure.

This means the values are 64 bit unfortunately, which is often
overkill.

s/64-bit/native word size/

Does anyone know of an ABI where that's *ineffic= ient*?!=C2=A0 Or at least, less efficient than returning a 32-bit int?=C2= =A0 Pretty much every ABI I ever saw says something along the lines of '= ;register FOO contains the return value if the type is small enough, otherw= ise for returning aggregates, register FOO contains ...'

=
I can't believe anyone would deliberately design an ABI wher= e calling
void *foo(void) is less efficient than calling int bar(= void);

(and if you have some weird DSP or the CDC6= 600 in mind where Linux won't run anyway, then comp.arch.necrophilia is= --> that way)
--001a114dc9e482072d0539d9edcd--