lkml.org 
[lkml]   [2008]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] CUSE: implement CUSE - Character device in Userspace
On 04:09 Fri 29 Aug     , Tejun Heo wrote:
> Hello, Andrew.
>
> Andrew Morton wrote:
> >> +struct cuse_conn {
> >> + struct fuse_conn fc;
> >> + struct cdev cdev;
> >> + struct vfsmount *mnt;
> >> + struct device *dev;
> >> + bool cdev_added:1;
> >> + bool disconnected:1; /* channel disconnected */
> >
> > I didn't know you could do that with bools.
>
> Hmm... I thought it was like any other integral types, no?
>

Boolean bit-fields are indeed valid. Usual semantics for objects of type
_Bool apply.

C99 6.7.2.1 Structure and union specifiers

4 A bit-field shall have a type that is a qualified or unqualified
version of _Bool, signed int, unsigned int, or some other
implementation-defined type.

--
Nick Bowler, Elliptic Semiconductor (http://www.ellipticsemi.com/)



\
 
 \ /
  Last update: 2008-08-29 18:03    [W:0.046 / U:12.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site