On Sun, Nov 7, 2010 at 9:23 PM, Li Zefan l...@cn.fujitsu.com wrote:
bool active;
bool disabled;
...
?
With alignment 5-8 bool values == 8 bytes in 64-bit machine, compared to
4 bytes with the approach this patch takes.
I meant specifying it as:
bool active:1;
bool disabled:1;
i.e.
Paul Menage wrote:
On Sun, Nov 7, 2010 at 9:23 PM, Li Zefan l...@cn.fujitsu.com wrote:
bool active;
bool disabled;
...
?
With alignment 5-8 bool values == 8 bytes in 64-bit machine, compared to
4 bytes with the approach this patch takes.
I meant specifying it as:
bool active:1;
On Tue, Nov 9, 2010 at 4:52 PM, Li Zefan l...@cn.fujitsu.com wrote:
bool active:1;
bool disabled:1;
It won't compile, but unsigned char active:1 will do. ;)
Are you sure? I don't have a buildable kernel tree at the moment, but
the following fragment compiled fine for me (with gcc 4.4.3):
Paul Menage wrote:
On Tue, Nov 9, 2010 at 4:52 PM, Li Zefan l...@cn.fujitsu.com wrote:
bool active:1;
bool disabled:1;
It won't compile, but unsigned char active:1 will do. ;)
Are you sure? I don't have a buildable kernel tree at the moment, but
the following fragment compiled fine for me
On Tue, Nov 9, 2010 at 6:06 PM, Li Zefan l...@cn.fujitsu.com wrote:
That said, I'll happily drop this patch. It just came to me when I
started to add new bool values to the structure. Or if you prefer
bool xxx:1 or just bool xxx, I can do that.
bool xxx:1 is fine with me - I think it's worth