summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2001-01-21 07:52:20 +0000
committerjasone <jasone@FreeBSD.org>2001-01-21 07:52:20 +0000
commit24d53563ed2aafc4622e310d16018cbbd0c95388 (patch)
tree0ed4cd8e7aa2e3a663ed7f62261fe70082bc423c /sys/amd64
parentdb586afb8bf54fe67c82b3bd5e80f1c1bc8dac47 (diff)
downloadFreeBSD-src-24d53563ed2aafc4622e310d16018cbbd0c95388.zip
FreeBSD-src-24d53563ed2aafc4622e310d16018cbbd0c95388.tar.gz
Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutex
initialization until after malloc() is safe to call, then iterate through all mutexes and complete their initialization. This change is necessary in order to avoid some circular bootstrapping dependencies.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/machdep.c10
-rw-r--r--sys/amd64/amd64/tsc.c2
-rw-r--r--sys/amd64/isa/clock.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 01cee5e..1bdcb0e 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -249,8 +249,8 @@ static struct globaldata __globaldata;
struct cpuhead cpuhead;
-MUTEX_DECLARE(,sched_lock);
-MUTEX_DECLARE(,Giant);
+struct mtx sched_lock;
+struct mtx Giant;
static void
cpu_startup(dummy)
@@ -441,7 +441,7 @@ again:
SLIST_INIT(&cpuhead);
SLIST_INSERT_HEAD(&cpuhead, GLOBALDATA, gd_allcpu);
- mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD | MTX_RECURSE);
+ mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE);
#ifdef SMP
/*
@@ -1939,7 +1939,7 @@ init386(first)
/*
* We need this mutex before the console probe.
*/
- mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_COLD | MTX_RECURSE);
+ mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_RECURSE);
/*
* Initialize the console before we print anything out.
@@ -1954,7 +1954,7 @@ init386(first)
/*
* Giant is used early for at least debugger traps and unexpected traps.
*/
- mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD | MTX_RECURSE);
+ mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE);
#ifdef DDB
kdb_init();
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index b34567b..14bcd93 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -140,7 +140,7 @@ int timer0_max_count;
u_int tsc_freq;
int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
-MUTEX_DECLARE(,clock_lock);
+struct mtx clock_lock;
static int beeping = 0;
static const u_char daysinmonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index b34567b..14bcd93 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -140,7 +140,7 @@ int timer0_max_count;
u_int tsc_freq;
int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
-MUTEX_DECLARE(,clock_lock);
+struct mtx clock_lock;
static int beeping = 0;
static const u_char daysinmonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};
OpenPOWER on IntegriCloud