summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-01-27 22:20:15 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-01-27 22:20:15 +0000
commitffaf2c55a856876601049d913fc58414ab024f98 (patch)
tree973032d84271692bbb5522bf9cdc89b3e27b8595 /sys
parentbef4bf1adf2652cbee085d36c7475cb2db3fa869 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/lock.h4
-rw-r--r--sys/vm/uma_core.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 03b41e3fb478..6fcb03312063 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -268,6 +268,9 @@ const char *witness_file(struct lock_object *);
#define WITNESS_UNLOCK(lock, flags, file, line) \
witness_unlock((lock), (flags), (file), (line))
+#define WITNESS_CHECK(flags, lock, fmt, ...) \
+ witness_warn((flags), (lock), (fmt), ## __VA_ARGS__)
+
#define WITNESS_WARN(flags, lock, fmt, ...) \
witness_warn((flags), (lock), (fmt), ## __VA_ARGS__)
@@ -296,6 +299,7 @@ const char *witness_file(struct lock_object *);
#define WITNESS_UPGRADE(lock, flags, file, line)
#define WITNESS_DOWNGRADE(lock, flags, file, line)
#define WITNESS_UNLOCK(lock, flags, file, line)
+#define WITNESS_CHECK(flags, lock, fmt, ...) 0
#define WITNESS_WARN(flags, lock, fmt, ...)
#define WITNESS_SAVE_DECL(n)
#define WITNESS_SAVE(lock, n)
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 1cec429db462..9cba214834d1 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1789,7 +1789,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags)
("malloc(M_WAITOK) in interrupt context"));
if (nosleepwithlocks) {
#ifdef WITNESS
- badness = WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK,
+ badness = WITNESS_CHECK(WARN_GIANTOK | WARN_SLEEPOK,
NULL,
"malloc(M_WAITOK) of \"%s\", forcing M_NOWAIT",
zone->uz_name);