Christoph wrote:Both are common in the kernel. I see 241 ":1" bit fields in include/linux/*.h. One can do Boolean expressions with either form, bitfields or defines. For example: struct { int foo:1; int goo:1; } x; if (x.foo && ! x.goo) blah blah ...; Doing (x.flags & FLAG_FOO) is simple enough, but it is still not as simple as (x.foo). Where possible, I encourage keeping extraneous detail out of mainline code. Sometimes, such as in task struct flags, one has to do such Boolean combinations in performance critical code paths, and then one must do what one must do, with the defined constants. Sometimes, such as with the GFP_* flags, one has to name various combinations, and then one needs again to use defined constants. I see no evidence that either of those situations applies here. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <pj@sgi.com> 1.940.382.4214 --
| Andrew Morton | -mm merge plans for 2.6.23 |
| David Miller | Re: [BUG] New Kernel Bugs |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Andrew Morton | Re: Linux 2.6.21-rc4 |
git: | |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Eric W. Biederman | [PATCH] macvlan: Support creating macvlans from macvlans |
