Re: INVARIANTS in sys/sys/sx.h



On Mon, Aug 28, 2006 at 11:38:47PM +0900, Jun Kuriyama wrote:

I found this when I compiled my kernel with INVARIANTS without
INVARIANT_SUPPORT.


It says in /usr/src/syc/conf/NOTES that INVARIANT_SUPPORT is a prerequisite
for INVARIANTS. I.e. having a kernel with INVARIANTS without
INVARIANT_SUPPORT is not expected to work.


In src/sys/sys/sx.h, _sx_assert() is defined in INVARIANT_SUPPORT,

#ifdef INVARIANT_SUPPORT
void _sx_assert(struct sx *sx, int what, const char *file, int line);
#endif

but sx_assert() uses this function in INVARIANTS option.

#ifdef INVARIANTS
#define sx_assert(sx, what) _sx_assert((sx), (what), LOCK_FILE, LOCK_LINE)
#else
#define sx_assert(sx, what)
#endif

Is this consistent?






--
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@xxxxxxxxxxxxx
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Performance issue
    ... make sure that you have WITNESS and INVARIANTS off in your ... You might also want to recompile your kernel with the SMP ... switches are consistent with the one-per-10msec I saw before. ...
    (freebsd-stable)
  • Re: panic: sorele
    ... > So you can build a kernel with INVARIANT_SUPPORT but no INVARIANTS but still ... sorele when the kernel is compiled with SMP ... I will compile my kernel without SMP... ...
    (freebsd-current)
  • Re: MSDOSFS woes
    ... Were you running with INVARIANTS on? ... > and causing kernel memory pool to become corrupted. ... First problem is with newfs_msdos(and kernel part of MSDOSFS). ... I've been able to reproduce the "wdrain" lockup ...
    (freebsd-current)
  • Re: computer becomes slow when compiling something
    ... enabled kernel. ... can consume a lot of CPU in kernel on a very active system, ... Especially WITNESS. ... WITNESS and INVARIANTS. ...
    (freebsd-current)
  • Re: 5.2.1-RC hangs occasionally when sound files are played using the pcm driver
    ... I'll try to reproduce it with witness and invariants first, ... I had built an SMP kernel. ... Do you Yahoo!? ...
    (freebsd-hackers)