From 81f71edaecb98c9f866d4f4e73973f46b53f79e0 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Mon, 11 Nov 2002 11:50:03 +0000 Subject: atomic_set_8 isn't MI. Instead, follow Jake's suggestions about ZONE_LOCK. --- sys/vm/uma_core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/vm/uma_core.c') 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; -- cgit v1.2.3