Move the corresponding MTX_SYSINIT() next to their struct mtx declaration

to make their relationship more obvious as done with the other such mutexs.
This commit is contained in:
andre 2012-10-26 17:31:35 +00:00
parent cc93b91b81
commit a8b2ff5af7
2 changed files with 10 additions and 8 deletions

View File

@ -307,6 +307,8 @@ struct kstack_cache_entry *kstack_cache;
static int kstack_cache_size = 128;
static int kstacks;
static struct mtx kstack_cache_mtx;
MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF);
SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0,
"");
SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0,
@ -486,7 +488,6 @@ kstack_cache_init(void *nulll)
EVENTHANDLER_PRI_ANY);
}
MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF);
SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL);
#ifndef NO_SWAPPING

View File

@ -44,7 +44,15 @@ static inline unsigned long __ffs(unsigned long word)
return word;
}
/*
* irq_mapping_update_lock: in order to allow an interrupt to occur in a critical
* section, to set pcpu->ipending (etc...) properly, we
* must be able to get the icu lock, so it can't be
* under witness.
*/
static struct mtx irq_mapping_update_lock;
MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN);
static struct xenpic *xp;
struct xenpic_intsrc {
struct intsrc xp_intsrc;
@ -1130,11 +1138,4 @@ evtchn_init(void *dummy __unused)
}
SYSINIT(evtchn_init, SI_SUB_INTR, SI_ORDER_MIDDLE, evtchn_init, NULL);
/*
* irq_mapping_update_lock: in order to allow an interrupt to occur in a critical
* section, to set pcpu->ipending (etc...) properly, we
* must be able to get the icu lock, so it can't be
* under witness.
*/
MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN);