Subject: Re: changes to bit-twiddling macros & __arraycount()
To: None <tech-kern@NetBSD.org, tech-userlevel@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-userlevel
Date: 08/13/2006 14:27:13
On Sat, Aug 12, 2006 at 08:04:17PM -0500, David Young wrote:
> I want them in userland for the convenience of programs for control &
> diagnostics of device drivers.  Portability is not key.

I personally think we should get rid of the bit macros completely - they
decrease code readability and lead to abuse.

As an especially bad example: we have code in our tree that does:

   switch (ISSET(t->c_cflag, CSIZE)) {
    case CS5:
      ..
    case CS6:
      ..
    ..
   }

Martin