lkml.org 
[lkml]   [2008]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] x86 byteorder.h: use __asm__/__inline__ for userspace
Date
On Saturday 27 December 2008 14:15:01 H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> > On Sat, Dec 27, 2008 at 10:58:11AM -0800, H. Peter Anvin wrote:
> >> Sam Ravnborg wrote:
> >>> I wnet with the scripted conversion for now.
> >>> If that does not fly we can come back to this proposal.
> >>>
> >>> What I like most with the auto conversion is that we avoid
> >>> adding yet another special rule about how to do stuff in exported
> >>> headers.
> >>
> >> Indeed, and being keyword conversion, it's independent of context, at
> >> least as long as one doesn't have too many run-ins with weird uses of
> >> the # and ## preprocessor operators, which are a *lot* easier to rule
> >> out globally.
> >
> > Speaking of what we want to use in exported headers.
> > What is the recommendation with respect to uint32_t and friends?
> > To my best knowledge they are banned in exported headers as they
> > are not part of the kernel namespace and I see few users too.
> > But is this something we should check for?
>
> I personally would not be upset if we auto-changed {su}{8,16,32,64},
> [u]int_{8,16,32,64}_t

{su}{8,16,32,64} doesnt matter too much to me vs {u,}int_t{8,16,32,64}_t. as
long as people stop using __{su}{8,16,32,64}. using the latter though does
mean headers will more likely be "just usable" w/out needing linux/types.h
include. but then people would be forced to include stdint.h or similar
before a linux header ... and that sucks.

unless of course we start adding appropriate C library includes for
!__KERNEL__ ... i'd love that personally

> and bool into the appropriate __{su}{8,16,32,64}
> types and _Bool.

i dont get your bool comment. the "bool" type is already a standard type.
there is no conversion needed.
-mike
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-12-27 20:23    [W:0.032 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site