INVARIANTS in sys/sys/sx.h




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

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?


--
Jun Kuriyama <kuriyama@xxxxxxxxxxxx> // IMG SRC, Inc.
<kuriyama@xxxxxxxxxxx> // FreeBSD Project
_______________________________________________
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

  • kbuild: Separate output directory - core patch
    ... # This patch format is intended for GNU patch command version 2.5 or higher. ... # Enable the possibility to build a kernel in a separate output ... +# or the modules are listed in "prepare-all". ...
    (Linux-Kernel)
  • Re: utrace comments
    ... of single-step on machines/configurations where single-step is always ... It is not mentioned in Documentation/CodingStyle, and the existing kernel ... I don not think these kinds of macros are a very good idea. ...
    (Linux-Kernel)
  • [PATCH] Yet another 4GB split patch
    ... This is another 4GB split patch for kernel 2.4.27. ... -static struct page * follow_page(struct mm_struct *mm, unsigned long address, int write) ... extern void __set_fixmap (enum fixed_addresses idx, ...
    (Linux-Kernel)
  • [PATCH 3/3] build system: section garbage collection - main part
    ... Introduce config option DISCARD_UNUSED_SECTIONS. ... # Makefile for the linux kernel. ... + /* .exit.text is discarded at runtime, not link time, to deal with references ...
    (Linux-Kernel)
  • [PATCH 4/20] FRV: Fujitsu FR-V CPU arch implementation part 2
    ... +#ifdef CONFIG_MMU ... +# handle single stepping into an exception prologue from kernel mode ... * DMA irq handler - determine channel involved, grab status and call real handler ...
    (Linux-Kernel)