Date: Thu, 5 Sep 2002 08:43:29 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Julian Elischer <julian@elischer.org> Cc: arch@FreeBSD.ORG Subject: Re: Process/thread states. Message-ID: <20020905054329.GN8069@hades.hell.gr> In-Reply-To: <Pine.BSF.4.21.0209042235180.34499-100000@InterJet.elischer.org> References: <20020905042733.GE8069@hades.hell.gr> <Pine.BSF.4.21.0209042235180.34499-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-09-04 22:35 +0000, Julian Elischer wrote: > On Thu, 5 Sep 2002, Giorgos Keramidas wrote: > > The mask test is not that bad, when read from someone who has very > > small experience with this part of the kernel. Or even, checks like: > > > > if ((td->td_wchan == 0) && (td->td_state & TDS_RUNNING || > > td->td_state & TDS_SUSPENDED)) > > > > It's not bad to know what is going on `within' the td struct, imho. > > Are you saying the macros are good or bad? Julian, it's up to you to decide. I can read both types of code just as easily. The mbuf code in many parts of the kernel uses both styles, alternating between the two. Allocation is done with M_GET() which is a macro. mbuf.m_flags tests are usually done with explicit checks instead of macros. I am not going to strongly object or favor any of these. They both have their place. It's you, as the implementor, that the ultimate choise lies with. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020905054329.GN8069>