From owner-freebsd-arch@FreeBSD.ORG Thu May 22 19:51:04 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3F681065689; Thu, 22 May 2008 19:51:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 61C968FC29; Thu, 22 May 2008 19:51:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 6058628448; Fri, 23 May 2008 03:51:01 +0800 (CST) Received: from localhost (tarsier.geekcn.org [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id D9860EB829A; Fri, 23 May 2008 03:51:00 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id u9MYShpk37Rw; Fri, 23 May 2008 03:50:56 +0800 (CST) Received: from charlie.delphij.net (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 845EFEB823F; Fri, 23 May 2008 03:50:54 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=m2qnIYzTZKOP6KaQDu6VEXYDHqLy3UOpOGCNXZ+In5skH6FHTax9ADf+8Q7nrnj3R qPV3TzAxvs+lytL19L1wg== Message-ID: <4835CE9C.1050707@delphij.net> Date: Thu, 22 May 2008 12:50:52 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Bruce Evans References: <482D193D.2010802@delphij.net> <20080516163857.Y43605@delplex.bde.org> In-Reply-To: <20080516163857.Y43605@delplex.bde.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: sephe@freebsd.org, d@delphij.net, freebsd-arch@freebsd.org Subject: Re: A couple of bitwise operations X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2008 19:51:04 -0000 -----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 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-----