diff options
author | jhb <jhb@FreeBSD.org> | 2006-01-17 16:47:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-01-17 16:47:42 +0000 |
commit | b24626498e03b6b9f6a3a0d5a7e5a85a04c4c6d4 (patch) | |
tree | 8caac150c9c38df59f02ac54cb5ee27fdcc25549 | |
parent | fefb2ce0cbd34fdc2b26aafbe5780f01c7735b1b (diff) | |
download | FreeBSD-src-b24626498e03b6b9f6a3a0d5a7e5a85a04c4c6d4.zip FreeBSD-src-b24626498e03b6b9f6a3a0d5a7e5a85a04c4c6d4.tar.gz |
Initialize thread0.td_contested in init_turnstiles() rather than
mutex_init() as it is used by the turnstile code and is not mutex-specific.
-rw-r--r-- | sys/kern/kern_mutex.c | 3 | ||||
-rw-r--r-- | sys/kern/subr_turnstile.c | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index f06813a..37370ca 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -904,9 +904,6 @@ void mutex_init(void) { - /* Setup thread0 so that mutexes work. */ - LIST_INIT(&thread0.td_contested); - /* Setup turnstiles so that sleep mutexes work. */ init_turnstiles(); diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 9bc1c66..57732b9 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -328,6 +328,7 @@ init_turnstiles(void) NULL, MTX_SPIN); } mtx_init(&td_contested_lock, "td_contested", NULL, MTX_SPIN); + LIST_INIT(&thread0.td_contested); thread0.td_turnstile = NULL; } |