Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2001 09:13:59 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mark Murray <mark@grondar.za>
Cc:        smp@FreeBSD.org, Bruce Evans <bde@zeta.org.au>
Subject:   Re: Please review - header cleanups
Message-ID:  <XFMail.010418091359.jhb@FreeBSD.org>
In-Reply-To: <200104181120.f3IBKkw89864@gratis.grondar.za>

next in thread | previous in thread | raw e-mail | index | archive | help

On 18-Apr-01 Mark Murray wrote:
> Said Bruce Evans <bde@zeta.org.au>:
>> > > The SMPng project has a TODO list at
>> > > http://people.freebsd.org/~jasone/smp/
>> > > And I grabbed what I thought would be an easy job one of
>> > > moving sys/mutex.h out of other "system" headers.
>> 
>> This is not an easy job.  It involves redesigning as many system
>> structs as possible (without significant loss of space or time
>> efficiency) to use `struct mtx *' instead of `struct mtx' so that
>> not so many headers depend on <sys/mutex.h> and/or moving the
>> declaration of `struct mtx' to its own header and including this
>> header instead of the full <sys/mutex.h> in system headers.
> 
> This is, as you say difficult. I took a look at the "struct mutex
> p_mtx" in struct proc. Its use looks scary :-(.
> 
> My change is, I believe, in agreement with the first paragraph
> of http://people.freebsd.org/~jasone/smp/ "Project Goal" in that
> it achieves _something_ in the quest of de-threading the chain of
>#includes. Not the whole story, perhaps, but a step in that direction.

Well, I put that up there because I was under the impression that nested
includes were to be avoided at all costs based on previous discussions with
Bruce.  It seems now that Bruce was more just trying to discourage the practice
but not condemning those particular cases as the alternatives were worse.
In the case of determing if headers should use nested #includes, etc. I defer
to Bruce as he is more authoritative in this area.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010418091359.jhb>