cvs commit: src/sys/sys sx.h

Bruce Evans bde at zeta.org.au
Wed Feb 4 09:42:44 PST 2004


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


More information about the cvs-src mailing list