From owner-freebsd-smp Sun Apr 22 0:11: 7 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 EC0CD37B423 for ; Sun, 22 Apr 2001 00:11:00 -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 f3M7Asw38713 for ; Sun, 22 Apr 2001 09:10:56 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <200104220710.f3M7Asw38713@gratis.grondar.za> Cc: smp@FreeBSD.ORG Subject: Re: Please review - header cleanups References: In-Reply-To: ; from Bruce Evans "Sun, 22 Apr 2001 11:57:19 +1000." Date: Sun, 22 Apr 2001 09:12:25 +0200 From: Mark Murray Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Said Bruce Evans : > > > LINT compiles after adding includes of (and sometimes > > > ) to "only" about 50 .c files. Many more probably depend > > > on the pollution in :-(. About 1/2 of the 50 really should > > I tried cleaning up and didn't find a good way. There is > also pollution related to curproc in . includes > to get curproc defined so that the inlines in > compile. Compiling these inlines only when they are used and not > including shows that many places have come to depend on > for its side effect of declaring curproc. What a mess. > > So making a seems to be on the cards. > > The mess for is much older and messier than for . > Now, is sort of an extension of , but most places > that include it are for its (intentional) side effect of including the > old lock interface, . The old lock interface will be going > away, so we shouldn't move the include of to *.c. OTOH, > the entanglement of makes it difficult to include > in the right places (if any). I think the next step should > be to include instead of in *.h. Damn. :-). I went and put lockmgr into .c's locally. NP - I fix. > > How bad does a sound? > > > > How bad does any <*/*_macros.h> sound (for both macros and inline > > code) where the header contains approximately _only_ executable > > stuff as opposed to "pure" declarations? > > I don't see how this would help. .c files can't include *_macros.h > without knowing too many implementation details, and .h files can't > include them without getting lots of pollution (since lots of interfaces > are needed to implement complicated inline functions or to call > complicated macros like mtx_lock()) (unless *_macros.h provide > alternative non-polluting interfaces for _everything_ relevant, which > I think would be too much work). Yuk. OK, thanks! 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