Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 May 2008 12:50:52 -0700
From:      Xin LI <delphij@delphij.net>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        sephe@freebsd.org, d@delphij.net, freebsd-arch@freebsd.org
Subject:   Re: A couple of bitwise operations
Message-ID:  <4835CE9C.1050707@delphij.net>
In-Reply-To: <20080516163857.Y43605@delplex.bde.org>
References:  <482D193D.2010802@delphij.net> <20080516163857.Y43605@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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@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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4835CE9C.1050707>