diff options
author | jhb <jhb@FreeBSD.org> | 2006-01-27 22:20:15 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-01-27 22:20:15 +0000 |
commit | 9b143bcf628f96ba0276241b5418226fa66565f2 (patch) | |
tree | 973032d84271692bbb5522bf9cdc89b3e27b8595 /sys/vm | |
parent | a7d556d07e348873d6c019459f76e997352e8562 (diff) | |
download | FreeBSD-src-9b143bcf628f96ba0276241b5418226fa66565f2.zip FreeBSD-src-9b143bcf628f96ba0276241b5418226fa66565f2.tar.gz |
Add a new macro wrapper WITNESS_CHECK() around the witness_warn() function.
The difference between WITNESS_CHECK() and WITNESS_WARN() is that
WITNESS_CHECK() should be used in the places that the return value of
witness_warn() is checked, whereas WITNESS_WARN() should be used in places
where the return value is ignored. Specifically, in a kernel without
WITNESS enabled, WITNESS_WARN() evaluates to an empty string where as
WITNESS_CHECK evaluates to 0. I also updated the one place that was
checking the return value of WITNESS_WARN() to use WITNESS_CHECK.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/uma_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 1cec429..9cba214 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); |