A couple of bitwise operations

Bruce Evans brde at optusnet.com.au
Fri May 16 06:45:53 UTC 2008


On Thu, 15 May 2008, Xin LI wrote:

> I find the DragonFly macros, __BIT, __BITS, __LOWEST_SET_BIT,
> __SHIFTOUT, __SHIFTIN and __SHIFTOUT_MASK useful.  Any objection adding
> this as sys/sys/bitops.h?
>
> (These macros are found in NetBSD in sys/sys/cdefs.h and DragonFly as
> sys/sys/bitops.h)

WHat's wrong with bitstring(3)(9undoc), except that it was invented here
and doesn't have a style bug after every #define?  Both have naming errors
-- bitstring has too many unsafe macros whose name is in lower case, while
bitops uses upper case even for safe macros.

Bruce


More information about the freebsd-arch mailing list