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>.

Fixed some style bugs:
- removed bogus LOCORE ifdef.  Including this C header in assembler
  sources is just nonsense.
- removed unused include of <sys/_mutex.h>.  It finished rotting when
  the mutex in struct sx became indirect in rev.1.15.
- removed most comments on #else and #endif's and cleaned up the others.
  All were misindented...
This commit is contained in:
Bruce Evans 2004-02-04 14:18:21 +00:00
parent 174e81ed65
commit cf4a32a1cd

View File

@ -30,9 +30,8 @@
#ifndef _SYS_SX_H_
#define _SYS_SX_H_
#ifndef LOCORE
#include <sys/queue.h>
#include <sys/_lock.h>
#include <sys/_mutex.h>
#include <sys/condvar.h> /* XXX */
struct sx {
@ -89,14 +88,14 @@ struct sx_args {
#define SX_SLOCKED LA_SLOCKED
#define SX_XLOCKED LA_XLOCKED
#define SX_UNLOCKED LA_UNLOCKED
#endif /* INVARIANTS || INVARIANT_SUPPORT */
#endif
#ifdef INVARIANTS
#define sx_assert(sx, what) _sx_assert((sx), (what), LOCK_FILE, LOCK_LINE)
#else /* INVARIANTS */
#else
#define sx_assert(sx, what)
#endif /* INVARIANTS */
#endif
#endif /* _KERNEL */
#endif /* !LOCORE */
#endif /* _SYS_SX_H_ */
#endif /* _KERNEL */
#endif /* !_SYS_SX_H_ */