diff options
author | 2021-02-08 08:18:45 +0000 | |
---|---|---|
committer | 2021-02-08 08:18:45 +0000 | |
commit | 436960cf02775967604f33beab159c0cf4ade5a0 (patch) | |
tree | 022a7dc14e584a114cfe643944556b30f771ce14 /sys/kern/kern_sched.c | |
parent | route-to rules take ips, not interfaces with optional ips. (diff) | |
download | wireguard-openbsd-436960cf02775967604f33beab159c0cf4ade5a0.tar.xz wireguard-openbsd-436960cf02775967604f33beab159c0cf4ade5a0.zip |
Simplify sleep_setup API to two operations in preparation for splitting
the SCHED_LOCK().
Putting a thread on a sleep queue is reduce to the following:
sleep_setup();
/* check condition or release lock */
sleep_finish();
Previous version ok cheloha@, jmatthew@, ok claudio@
Diffstat (limited to 'sys/kern/kern_sched.c')
-rw-r--r-- | sys/kern/kern_sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index 24b4faa1fe2..758aac7af64 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.68 2021/01/09 20:57:46 gnezdo Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.69 2021/02/08 08:18:45 mpi Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org> * @@ -674,7 +674,7 @@ sched_stop_secondary_cpus(void) if (CPU_IS_PRIMARY(ci)) continue; while ((spc->spc_schedflags & SPCF_HALTED) == 0) { - sleep_setup(&sls, spc, PZERO, "schedstate"); + sleep_setup(&sls, spc, PZERO, "schedstate", 0); sleep_finish(&sls, (spc->spc_schedflags & SPCF_HALTED) == 0); } |