aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2002-11-11 11:50:03 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2002-11-11 11:50:03 +0000
commit81f71edaecb98c9f866d4f4e73973f46b53f79e0 (patch)
tree6045ed31985d52907a481f015d08501fccf8a3e0 /sys/vm/uma_core.c
parent34fa8213c34a771b1125d78c32e9d276c5a97594 (diff)
downloadsrc-81f71edaecb98c9f866d4f4e73973f46b53f79e0.tar.gz
src-81f71edaecb98c9f866d4f4e73973f46b53f79e0.zip
atomic_set_8 isn't MI. Instead, follow Jake's suggestions about
ZONE_LOCK.
Notes
Notes: svn path=/head/; revision=106773
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r--sys/vm/uma_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 886415088bc0..443c1978e3f4 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1348,7 +1348,9 @@ zalloc_start:
("uma_zalloc: Bucket pointer mangled."));
cache->uc_allocs++;
#ifdef INVARIANTS
+ ZONE_LOCK(zone);
uma_dbg_alloc(zone, NULL, item);
+ ZONE_UNLOCK(zone);
#endif
CPU_UNLOCK(zone, cpu);
if (zone->uz_ctor)
@@ -1698,10 +1700,12 @@ zfree_start:
("uma_zfree: Freeing to non free bucket index."));
bucket->ub_bucket[bucket->ub_ptr] = item;
#ifdef INVARIANTS
+ ZONE_LOCK(zone);
if (zone->uz_flags & UMA_ZFLAG_MALLOC)
uma_dbg_free(zone, udata, item);
else
uma_dbg_free(zone, NULL, item);
+ ZONE_UNLOCK(zone);
#endif
CPU_UNLOCK(zone, cpu);
return;