summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2002-11-11 11:50:03 +0000
committermjacob <mjacob@FreeBSD.org>2002-11-11 11:50:03 +0000
commita58a13572c34a910f967d757419e8808d28d7080 (patch)
tree6045ed31985d52907a481f015d08501fccf8a3e0 /sys/vm/uma_core.c
parent277111e6aa3154570bb671fbd617e14c32ae901a (diff)
downloadFreeBSD-src-a58a13572c34a910f967d757419e8808d28d7080.zip
FreeBSD-src-a58a13572c34a910f967d757419e8808d28d7080.tar.gz
atomic_set_8 isn't MI. Instead, follow Jake's suggestions about
ZONE_LOCK.
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 8864150..443c197 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;
OpenPOWER on IntegriCloud