Subject: Re: Bitfields and kernel
To: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 09/30/1999 13:10:00
On Thu, 30 Sep 1999 15:03:55 -0500 
 "Brian C. Grayson" <bgrayson@marvin.ece.utexas.edu> wrote:

 >   For testing multiple bits, to me it is more clear to say
 > if ((msr.pow == 1) && (msr.ile == 0))
 > than
 > if ((msr&POW_BIT) && !(msr&ILE_BIT))
 > or
 > if ((msr&POW_BIT == POW_BIT) && (msr&ILE_BIT == 0))

	if ((msr & (POW_BIT|ILE_BIT)) == POW_BIT)

 >   It looks like there's no clear consensus :), so I'll just do
 > what I like for private userland code, and I'll try to match
 > the current style whenever doing any NetBSD devel. 

Bitfields bad.  Evil.  Bad.  Just my $.02 :-)

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>