From 0da9c86e7fb39e1edbda99de6fbc68719a6a3e7f Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 20 Oct 2000 07:32:48 +0000 Subject: - machine/mutex.h -> sys/mutex.h - Use MUTEX_DECLARE() and MTX_COLD for Giant and sched_lock. --- sys/alpha/alpha/machdep.c | 10 +++++----- sys/amd64/amd64/machdep.c | 12 ++++++------ sys/i386/i386/machdep.c | 12 ++++++------ sys/ia64/ia64/machdep.c | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 36bd959..27ba0f1 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -97,7 +97,7 @@ #include #include #include -#include +#include #include #include #include @@ -153,8 +153,8 @@ struct bootinfo_kernel bootinfo; struct cpuhead cpuhead; -struct mtx sched_lock; -struct mtx Giant; +MUTEX_DECLARE( ,sched_lock); +MUTEX_DECLARE( ,Giant); struct user *proc0paddr; @@ -1029,8 +1029,8 @@ alpha_init(pfn, ptb, bim, bip, biv) /* * Initialise mutexes. */ - mtx_init(&Giant, "Giant", MTX_DEF); - mtx_init(&sched_lock, "sched lock", MTX_SPIN); + mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD); + mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD); /* * Enable interrupts on first release (in switch_trampoline). diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 6634aba..03bd07d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -98,7 +99,6 @@ #include #include #include -#include #include #include /* pcb.h included via sys/user.h */ #include @@ -247,8 +247,8 @@ static struct trapframe proc0_tf; struct cpuhead cpuhead; -struct mtx sched_lock; -struct mtx Giant; +MUTEX_DECLARE(,sched_lock); +MUTEX_DECLARE(,Giant); #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -428,7 +428,7 @@ again: SLIST_INIT(&cpuhead); SLIST_INSERT_HEAD(&cpuhead, GLOBALDATA, gd_allcpu); - mtx_init(&sched_lock, "sched lock", MTX_SPIN); + mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD); #ifdef SMP /* @@ -1941,7 +1941,7 @@ init386(first) /* * We need this mutex before the console probe. */ - mtx_init(&clock_lock, "clk interrupt lock", MTX_SPIN); + mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_COLD); /* * Initialize the console before we print anything out. @@ -1956,7 +1956,7 @@ init386(first) /* * Giant is used early for at least debugger traps and unexpected traps. */ - mtx_init(&Giant, "Giant", MTX_DEF); + mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD); #ifdef DDB kdb_init(); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 6634aba..03bd07d 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -98,7 +99,6 @@ #include #include #include -#include #include #include /* pcb.h included via sys/user.h */ #include @@ -247,8 +247,8 @@ static struct trapframe proc0_tf; struct cpuhead cpuhead; -struct mtx sched_lock; -struct mtx Giant; +MUTEX_DECLARE(,sched_lock); +MUTEX_DECLARE(,Giant); #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -428,7 +428,7 @@ again: SLIST_INIT(&cpuhead); SLIST_INSERT_HEAD(&cpuhead, GLOBALDATA, gd_allcpu); - mtx_init(&sched_lock, "sched lock", MTX_SPIN); + mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD); #ifdef SMP /* @@ -1941,7 +1941,7 @@ init386(first) /* * We need this mutex before the console probe. */ - mtx_init(&clock_lock, "clk interrupt lock", MTX_SPIN); + mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_COLD); /* * Initialize the console before we print anything out. @@ -1956,7 +1956,7 @@ init386(first) /* * Giant is used early for at least debugger traps and unexpected traps. */ - mtx_init(&Giant, "Giant", MTX_DEF); + mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD); #ifdef DDB kdb_init(); diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 7d3241f..32cc8c0 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -84,8 +84,8 @@ struct bootinfo_kernel bootinfo; struct cpuhead cpuhead; -struct mtx sched_lock; -struct mtx Giant; +MUTEX_DECLARE( ,sched_lock); +MUTEX_DECLARE( ,Giant); struct user *proc0paddr; @@ -617,8 +617,8 @@ ia64_init() /* * Initialise mutexes. */ - mtx_init(&Giant, "Giant", MTX_DEF); - mtx_init(&sched_lock, "sched lock", MTX_SPIN); + mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD); + mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD); #if 0 /* -- cgit v1.1