From owner-freebsd-current Thu Apr 10 17:22:49 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA13392 for current-outgoing; Thu, 10 Apr 1997 17:22:49 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA13378 for ; Thu, 10 Apr 1997 17:22:46 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.8.5/8.8.5) id UAA05660; Thu, 10 Apr 1997 20:21:58 -0400 (EDT) Date: Thu, 10 Apr 1997 20:21:58 -0400 (EDT) From: Garrett Wollman Message-Id: <199704110021.UAA05660@khavrinen.lcs.mit.edu> To: Terry Lambert Cc: current@FreeBSD.ORG Subject: WHY? ...non-use of TAILQ macros... In-Reply-To: <199704102248.PAA10021@phaeton.artisoft.com> References: <199704102248.PAA10021@phaeton.artisoft.com> Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk < said: > I'm wondering why the following aren't written using the macros (macro > versions are shown one line below): > kern_lockf.c: while (ltmp = overlap->lf_blkhd.tqh_first) { 1. Because they are a FreeBSD (actually Justin Gibbs) invention. Obviously, original Berkeley code will not use a macro that Berkeley didn't have. 2. Because they are unnecessary. > #define TAILQ_ENUM(elm,head,field) \ > for( elm = (head)->tqh_first; elm != NULL; elm = (elm)->field.tqe_next) Go read style(9) and then say that with a straight face. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick