summaryrefslogtreecommitdiffstats
path: root/sys/sys/sched.h
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2017-12-14 23:21:04 +0000
committerdlg <dlg@openbsd.org>2017-12-14 23:21:04 +0000
commit0e4e575207c5ab24aa65ccf970655a99237396c1 (patch)
treefb48f92075dece640fd03c18ec8a71338f2eeff4 /sys/sys/sched.h
parentset Location header for 307 and 308 status codes (diff)
downloadwireguard-openbsd-0e4e575207c5ab24aa65ccf970655a99237396c1.tar.xz
wireguard-openbsd-0e4e575207c5ab24aa65ccf970655a99237396c1.zip
make sched_barrier use cond_wait/cond_signal.
previously the code was using a percpu flag to manage the sleeps/wakeups, which means multiple threads waiting for a barrier on a cpu could race. moving to a cond struct on the stack fixes this. while here, get rid of the sbar taskq and just use systqmp instead. the barrier tasks are short, so there's no real downside. ok mpi@
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r--sys/sys/sched.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 0da1f2c9afd..698eda820a0 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched.h,v 1.43 2017/12/04 09:51:03 mpi Exp $ */
+/* $OpenBSD: sched.h,v 1.44 2017/12/14 23:21:04 dlg Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
@@ -114,8 +114,6 @@ struct schedstate_percpu {
struct proc *spc_reaper; /* dead proc reaper */
#endif
LIST_HEAD(,proc) spc_deadproc;
-
- volatile int spc_barrier; /* for sched_barrier() */
};
#ifdef _KERNEL