diff options
author | Jason Evans <jasone@FreeBSD.org> | 2001-01-21 07:52:20 +0000 |
---|---|---|
committer | Jason Evans <jasone@FreeBSD.org> | 2001-01-21 07:52:20 +0000 |
commit | d1c1b8413eda1667fac8797ca8ea32819f51eed3 (patch) | |
tree | 0ee93105c7d9a172974583579640832d14a218f1 /sys/pc98 | |
parent | 8363b95b57feec9d900c7056843d030adbae592a (diff) | |
download | src-d1c1b8413eda1667fac8797ca8ea32819f51eed3.tar.gz src-d1c1b8413eda1667fac8797ca8ea32819f51eed3.zip |
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.
Notes
Notes:
svn path=/head/; revision=71320
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/clock.c | 2 | ||||
-rw-r--r-- | sys/pc98/cbus/pcrtc.c | 2 | ||||
-rw-r--r-- | sys/pc98/i386/machdep.c | 10 | ||||
-rw-r--r-- | sys/pc98/pc98/clock.c | 2 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 10 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index 3acf9a408cf7..7de923d1c5a2 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.c @@ -154,7 +154,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/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index 3acf9a408cf7..7de923d1c5a2 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -154,7 +154,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/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index cf9df15ac947..410532461ec4 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -262,8 +262,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) @@ -454,7 +454,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 /* @@ -2248,7 +2248,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. @@ -2263,7 +2263,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/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c index 3acf9a408cf7..7de923d1c5a2 100644 --- a/sys/pc98/pc98/clock.c +++ b/sys/pc98/pc98/clock.c @@ -154,7 +154,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/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index cf9df15ac947..410532461ec4 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -262,8 +262,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) @@ -454,7 +454,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 /* @@ -2248,7 +2248,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. @@ -2263,7 +2263,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(); |