From owner-freebsd-arch@FreeBSD.ORG Fri May 16 06:45:53 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 84B2A1065672 for ; Fri, 16 May 2008 06:45:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 066758FC17 for ; Fri, 16 May 2008 06:45:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c220-239-252-11.carlnfd3.nsw.optusnet.com.au (c220-239-252-11.carlnfd3.nsw.optusnet.com.au [220.239.252.11]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m4G6ip67022790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 May 2008 16:45:04 +1000 Date: Fri, 16 May 2008 16:44:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: d@delphij.net In-Reply-To: <482D193D.2010802@delphij.net> Message-ID: <20080516163857.Y43605@delplex.bde.org> References: <482D193D.2010802@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: sephe@freebsd.org, 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 List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2008 06:45:53 -0000 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