A couple of bitwise operations

Xin LI delphij at delphij.net
Thu May 22 19:51:04 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Bruce,

Bruce Evans wrote:
| 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.

Hmm...  So the scenario is that I have ported a DragonFly driver to
FreeBSD and do not want to make massive changes to it so that we can
apply further change from their code easier.  Does it make sense if I
keep these changes inside the driver specific header file?

Cheers,
- --
** Help China's quake relief at http://www.redcross.org.cn/
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Xin LI <delphij at delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEUEARECAAYFAkg1zpwACgkQi+vbBBjt66C5LACY3XkP6sfEg8UKcegpKrHVDPCB
4gCePOUVwLyVndyMxFlxBVFHLMYFmHI=
=3V15
-----END PGP SIGNATURE-----


More information about the freebsd-arch mailing list