summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-10-20 07:32:48 +0000
committerjhb <jhb@FreeBSD.org>2000-10-20 07:32:48 +0000
commit0da9c86e7fb39e1edbda99de6fbc68719a6a3e7f (patch)
tree1bc073963cebf75ed5af7f344fd10afebb9fad19
parented47777d0567cd5bf98f5b210d770eeb86aeba1e (diff)
downloadFreeBSD-src-0da9c86e7fb39e1edbda99de6fbc68719a6a3e7f.zip
FreeBSD-src-0da9c86e7fb39e1edbda99de6fbc68719a6a3e7f.tar.gz
- machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for Giant and sched_lock.
-rw-r--r--sys/alpha/alpha/machdep.c10
-rw-r--r--sys/amd64/amd64/machdep.c12
-rw-r--r--sys/i386/i386/machdep.c12
-rw-r--r--sys/ia64/ia64/machdep.c8
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 <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/sysproto.h>
-#include <machine/mutex.h>
+#include <sys/mutex.h>
#include <sys/ktr.h>
#include <sys/signalvar.h>
#include <sys/kernel.h>
@@ -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 <sys/ktr.h>
#include <sys/linker.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/bio.h>
#include <sys/buf.h>
@@ -98,7 +99,6 @@
#include <machine/specialreg.h>
#include <machine/bootinfo.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/pc/bios.h>
#include <machine/pcb_ext.h> /* pcb.h included via sys/user.h */
#include <machine/globaldata.h>
@@ -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 <sys/ktr.h>
#include <sys/linker.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/bio.h>
#include <sys/buf.h>
@@ -98,7 +99,6 @@
#include <machine/specialreg.h>
#include <machine/bootinfo.h>
#include <machine/md_var.h>
-#include <machine/mutex.h>
#include <machine/pc/bios.h>
#include <machine/pcb_ext.h> /* pcb.h included via sys/user.h */
#include <machine/globaldata.h>
@@ -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
/*
OpenPOWER on IntegriCloud