diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-05-14 18:47:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-05-14 18:47:57 +0000 |
commit | 4a681c84c73ea5f06e3780a9e28c9b51e9903df4 (patch) | |
tree | ca9123edefe7b1d9556cfd9ad8eadcf14ea4033c /sys/kern | |
parent | f0dfa83de5ced9acad0d97b94b99cde7124e85da (diff) |
Make sure we initialize sched_lock before we try to use it.
ok miod@, thib@, oga@, jsing@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/init_main.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_sched.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 3f63d3d9cfa..9d7601dbcae 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.166 2010/01/12 04:06:26 deraadt Exp $ */ +/* $OpenBSD: init_main.c,v 1.167 2010/05/14 18:47:56 kettenis Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -216,6 +216,7 @@ main(void *framep) printf("%s\n", copyright); KERNEL_LOCK_INIT(); + SCHED_LOCK_INIT(); uvm_init(); disk_init(); /* must come before autoconfiguration */ diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index ffb6285e065..3bee9d98f0c 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.19 2010/04/23 21:34:38 deraadt Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.20 2010/05/14 18:47:56 kettenis Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org> * @@ -200,9 +200,6 @@ sched_exit(struct proc *p) void sched_init_runqueues(void) { -#ifdef MULTIPROCESSOR - __mp_lock_init(&sched_lock); -#endif } void |