Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2004 04:42:38 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys sx.h
Message-ID:  <20040205042752.D3649@gamplex.bde.org>
In-Reply-To: <20040204163157.GC5546@FreeBSD.org.ua>
References:  <200402041418.i14EIMfv054158@repoman.freebsd.org> <20040204163157.GC5546@FreeBSD.org.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 4 Feb 2004, Ruslan Ermilov wrote:

> On Wed, Feb 04, 2004 at 06:18:21AM -0800, Bruce Evans wrote:
> > bde         2004/02/04 06:18:21 PST
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     sys/sys              sx.h
> >   Log:
> >   Include <sys/queue.h> before <sys/_lock.h> instead of depending on
> >   namespace pollution in other headers.  <sys/types.h> is now the only
> >   prerequisite for <sys/sx.h>.
> > ...
> Please update the sx(9) manpage to reflect this change.

That's easy since the reflection is null :-).  <sys/queue.h> isn't mentioned
in the man page.  Folloing the man page gave it as a side effect of
including <sys/lock.h>.

The man page is not incorrect in requiring <sys/param.h> and <sys/lock.h>
before <sys/sx.h>.  <sys/param.h> instead of <sys/types.h> is required
(for other headers) in practice, and <sys/lock.h> is required if
INVARIANTS is defined and sx_assert() is used.  It's easier to document
<sys/lock.h> as a prerequisite than to document the ifdef tangle.
<sys/mutex.h> enforces a prerequisite of <sys/lock.h> although it could
be unnecessary in similar cases.

Bruce



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