From owner-freebsd-arch@FreeBSD.ORG Thu Mar 15 13:56:26 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C98B716A469 for ; Thu, 15 Mar 2007 13:56:26 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 34BC413C48A for ; Thu, 15 Mar 2007 13:56:25 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l2FDh5B5032428; Thu, 15 Mar 2007 16:43:05 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l2FDh1NY032420; Thu, 15 Mar 2007 16:43:01 +0300 (MSK) (envelope-from yar) Date: Thu, 15 Mar 2007 16:43:00 +0300 From: Yar Tikhiy To: Poul-Henning Kamp Message-ID: <20070315134300.GE28354@comp.chem.msu.su> References: <39968.1173776514@critter.freebsd.dk> <40441.1173778685@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40441.1173778685@critter.freebsd.dk> User-Agent: Mutt/1.5.9i Cc: arch@freebsd.org Subject: Re: bikeshed proposal 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: Thu, 15 Mar 2007 13:56:26 -0000 On Tue, Mar 13, 2007 at 09:38:05AM +0000, Poul-Henning Kamp wrote: > In message <39968.1173776514@critter.freebsd.dk>, Poul-Henning Kamp writes: > > > >It has always bothered me that some of the TAILQ macros need to > >know the struct name of the header type. Yeah, can present a challenge in understanding an implementation of basic data structures and related algos. :-) You thought that tqe_prev points to the whole entry structure when making the patch, didn't you? Personally, I cannot explain to myself why in the double-linked structs the prev member points to the next member in the previous list element and not to the previous list element itself. Could anybody with CS education explain merits of the current approach? I can only see that now we have to go to the element before the previous one for a pointer to the latter. I'm not going to dispute the current way of things, just curious. -- Yar