diff options
author | jhb <jhb@FreeBSD.org> | 2002-04-02 22:19:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-04-02 22:19:16 +0000 |
commit | 9d3d63fcbcfccaf091b15608a262de78b5912c8a (patch) | |
tree | a511bf3088c2455af875faa67fac4fc49ade8493 /sys/pc98/i386 | |
parent | 26f5df0f6761c5fad4b517e8c0c4b46da408361b (diff) | |
download | FreeBSD-src-9d3d63fcbcfccaf091b15608a262de78b5912c8a.zip FreeBSD-src-9d3d63fcbcfccaf091b15608a262de78b5912c8a.tar.gz |
- Move the MI mutexes sched_lock and Giant from being declared in the
various machdep.c's to being declared in kern_mutex.c.
- Add a new function mutex_init() used to perform early initialization
needed for mutexes such as setting up thread0's contested lock list
and initializing MI mutexes. Change the various MD startup routines
to call this function instead of duplicating all the code themselves.
Tested on: alpha, i386
Diffstat (limited to 'sys/pc98/i386')
-rw-r--r-- | sys/pc98/i386/machdep.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 8c904dc..9e63dcc 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -223,8 +223,6 @@ static struct trapframe proc0_tf; static struct pcpu __pcpu; #endif -struct mtx sched_lock; -struct mtx Giant; struct mtx icu_lock; static void @@ -1757,12 +1755,8 @@ init386(first) pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(prvspace, pc); - - /* setup curproc so that mutexes work */ PCPU_SET(curthread, &thread0); - LIST_INIT(&thread0.td_contested); - /* * Initialize mutexes. * @@ -1771,12 +1765,9 @@ init386(first) * must be able to get the icu lock, so it can't be * under witness. */ - mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE); - mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE); - mtx_init(&proc0.p_mtx, "process lock", MTX_DEF|MTX_DUPOK); + mutex_init(); mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_RECURSE); mtx_init(&icu_lock, "icu", MTX_SPIN | MTX_NOWITNESS); - mtx_lock(&Giant); /* make ldt memory segments */ /* |