[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1475768490.1914.5.camel@perches.com>
Date: Thu, 06 Oct 2016 08:41:30 -0700
From: Joe Perches <joe@...ches.com>
To: David Laight <David.Laight@...LAB.COM>, Pavel Machek <pavel@....cz>
Cc: Marcel Holtmann <marcel@...tmann.org>,
"trivial@...nel.org" <trivial@...nel.org>,
"Gustavo F. Padovan" <gustavo@...ovan.org>,
Johan Hedberg <johan.hedberg@...il.com>,
"David S. Miller" <davem@...emloft.net>,
"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not
neccessary inside kernel
On Thu, 2016-10-06 at 13:00 +0000, David Laight wrote:
> From: Joe Perches
> > Sent: 06 October 2016 12:39
> > On Thu, 2016-10-06 at 09:41 +0000, David Laight wrote:
> > > From: Joe Perches
> > > > No worries, and bool is the same ,size as u8.
> > > That is not guaranteed at all.
> > > One of the ARM ABI defined bool to be the size of int.
> > Really? What kernel has sizeof(_Bool) != 1 ?
> Probably none, but I know systems have used larger bool.
> I found this:
> > with egcs-2.90.29 980515 (egcs-1.0.3 release) on alphaev56-dec-osf4.0d
> > bool = 8
> > short = 2
> > int = 4
> > long = 8
It's likely there are probably DSPs and old TOPS-20/CDC-6400
systems where sizeof(u16) isn't 2 as well.
I think linux isn't likely to be ported successfully to
those platforms.
No matter. If bool isn't desired because some future
expansion to this is likely and memory needs to be conserved,
fine, use a bitfield.
It can be slower than bool because it can be RMW.
cheers, Joe
Powered by blists - more mailing lists