Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496711

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel
Date 2016-10-06 17:50 +0200
Message-ID <spj5L-2ak-1@gated-at.bofh.it> (permalink)
References (3 earlier) <soZTs-5Rt-29@gated-at.bofh.it> <soZTs-5Rt-31@gated-at.bofh.it> <spdto-6Li-43@gated-at.bofh.it> <spfbQ-7Yg-23@gated-at.bofh.it> <spgAW-wz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Pavel Machek <pavel@ucw.cz> - 2016-10-03 11:00 +0200
  Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Marcel Holtmann <marcel@holtmann.org> - 2016-10-05 13:20 +0200
    Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Joe Perches <joe@perches.com> - 2016-10-05 20:00 +0200
      Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Pavel Machek <pavel@ucw.cz> - 2016-10-05 21:20 +0200
        Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Joe Perches <joe@perches.com> - 2016-10-05 21:20 +0200
          Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Pavel Machek <pavel@ucw.cz> - 2016-10-06 00:20 +0200
            Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Joe Perches <joe@perches.com> - 2016-10-06 00:30 +0200
              Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Pavel Machek <pavel@ucw.cz> - 2016-10-06 09:10 +0200
                Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Joe Perches <joe@perches.com> - 2016-10-06 09:10 +0200
                Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Johan Hedberg <johan.hedberg@gmail.com> - 2016-10-06 10:40 +0200
          RE: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel David Laight <David.Laight@ACULAB.COM> - 2016-10-06 11:50 +0200
            Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Joe Perches <joe@perches.com> - 2016-10-06 13:40 +0200
              RE: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel David Laight <David.Laight@ACULAB.COM> - 2016-10-06 15:10 +0200
                Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Joe Perches <joe@perches.com> - 2016-10-06 17:50 +0200
  [PATCHv2] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Pavel Machek <pavel@ucw.cz> - 2016-10-05 23:00 +0200
    Re: [PATCHv2] bluetooth.h: __ variants of u8 and friends are not  neccessary inside kernel Marcel Holtmann <marcel@holtmann.org> - 2016-10-06 00:00 +0200

csiph-web