From owner-freebsd-smp Wed Apr 18 23:34:10 2001 Delivered-To: freebsd-smp@freebsd.org Received: from gratis.grondar.za (grouter.grondar.za [196.7.18.65]) by hub.freebsd.org (Postfix) with ESMTP id 5C4EC37B422 for ; Wed, 18 Apr 2001 23:34:04 -0700 (PDT) (envelope-from mark@grondar.za) Received: from grondar.za (gratis.grondar.za [196.7.18.133]) by gratis.grondar.za (8.11.3/8.11.3) with ESMTP id f3J6Xvw99980 for ; Thu, 19 Apr 2001 08:34:00 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <200104190634.f3J6Xvw99980@gratis.grondar.za> To: smp@FreeBSD.org Subject: Re: Please review - header cleanups References: In-Reply-To: ; from Bruce Evans "Thu, 19 Apr 2001 09:37:18 +1000." Date: Thu, 19 Apr 2001 08:35:31 +0200 From: Mark Murray Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Said Bruce Evans : > Possible implementations: > 1) Do the same things as are planned for `struct timespec': use a tiny > header that declares just `struct mtx' and include this header as > necessary. Ok so this would be a header with only the "struct mtx { ... };" in it, and it would be included in all the headers that need to know the size and shape of struct mtx (including sys/mutex.h)? > 2) Do the same things as are done for size_t: define a macro that declares > `struct mtx' in a not so tiny secondary header; include this header and > expand it as necessary. This is uglier than (1), but doesn't require > so many headers. I think I prefer 1). > 3) Combination/variation of on (1)-(2): conditionally declare various > structs and types in a not so tiny secondary header; include this > header with only the required declarations selected. This method is > used in glibc. This is not as ugly as (2), but I think it is slower > than both (1) and (2). ONE header to declare _all_/lots_of the "internal" structures? Hmmm... M -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message