Re: SET, CLR, ISSET in types.h for _KERNEL builds
- From: "Poul-Henning Kamp" <phk@xxxxxxxxxxxxxx>
- Date: Wed, 28 Jun 2006 09:53:46 +0000
In message <20060628094221.GA50978@xxxxxxxxxxxxxxxx>, Yar Tikhiy writes:
On Tue, Jun 27, 2006 at 01:58:17PM -0600, M. Warner Losh wrote:
NetBSD recently added SET, CLR, ISSET to sys/types.h (only if _KERNEL
is defined).
As one of the people who have worked with the original /bin/sh source
code, I have a slight alergic reaction to attempts to paste over
the implementation language with macros like these.
Setting a bit in 'C' is spelled
variable |= bit;
not
SET(variable, bit);
Higher order macros like roundup(), ispow2() are fine with me,
because they implement something on top of the language and make
the source code more compact and thus faster to read.
But all of the three proposed macros take up more space than
the native language they obfuscate, what is the sense in that ?
If we want to have them for NETBSD compatibility, they should
be enclosed in
#ifdef NETBSD_COMPAT
#endif
Or better yet: be put in sys/sys/netbsd_compat.h
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@xxxxxxxxxxx | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: SET, CLR, ISSET in types.h for _KERNEL builds
- From: Bruce Evans
- Re: SET, CLR, ISSET in types.h for _KERNEL builds
- From: Andrew Reilly
- Re: SET, CLR, ISSET in types.h for _KERNEL builds
- References:
- Re: SET, CLR, ISSET in types.h for _KERNEL builds
- From: Yar Tikhiy
- Re: SET, CLR, ISSET in types.h for _KERNEL builds
- Prev by Date: Re: SET, CLR, ISSET in types.h for _KERNEL builds
- Next by Date: Re: SET, CLR, ISSET in types.h for _KERNEL builds
- Previous by thread: Re: SET, CLR, ISSET in types.h for _KERNEL builds
- Next by thread: Re: SET, CLR, ISSET in types.h for _KERNEL builds
- Index(es):
Relevant Pages
|