mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Move the definition of LOCK_DEBUG from sys/lock.h to sys/_lock.h.
This commit is contained in:
parent
a3484cc54c
commit
9ba567a07c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83945
@ -31,6 +31,22 @@
|
||||
#ifndef _SYS_LOCK_TYPES_H_
|
||||
#define _SYS_LOCK_TYPES_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled,
|
||||
* then turn on LOCK_DEBUG. When this option is on, extra debugging
|
||||
* facilities such as tracking the file and line number of lock operations
|
||||
* are enabled. Also, mutex locking operations are not inlined to avoid
|
||||
* bloat from all the extra debugging code. We also have to turn on all the
|
||||
* calling conventions for this debugging code in modules so that modules can
|
||||
* work with both debug and non-debug kernels.
|
||||
*/
|
||||
#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK))
|
||||
#define LOCK_DEBUG
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
struct lock_object {
|
||||
struct lock_class *lo_class;
|
||||
const char *lo_name;
|
||||
|
@ -123,19 +123,6 @@ struct lock_list_entry {
|
||||
u_int ll_count;
|
||||
};
|
||||
|
||||
/*
|
||||
* If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled,
|
||||
* then turn on LOCK_DEBUG. When this option is on, extra debugging
|
||||
* facilities such as tracking the file and line number of lock operations
|
||||
* are enabled. Also, mutex locking operations are not inlined to avoid
|
||||
* bloat from all the extra debugging code. We also have to turn on all the
|
||||
* calling conventions for this debugging code in modules so that modules can
|
||||
* work with both debug and non-debug kernels.
|
||||
*/
|
||||
#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK))
|
||||
#define LOCK_DEBUG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* In the LOCK_DEBUG case, use the filename and line numbers for debugging
|
||||
* operations. Otherwise, use default values to avoid the unneeded bloat.
|
||||
|
Loading…
Reference in New Issue
Block a user