summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2010-06-29 00:28:14 +0000
committertedu <tedu@openbsd.org>2010-06-29 00:28:14 +0000
commit351c20c593075aab5a3342f59ad7ce1e96b7b1ad (patch)
tree6b9506388289e1163b5f5d4dfbb65903555678a4 /sys/kern/kern_synch.c
parentClean up iterface stats handling: (diff)
downloadwireguard-openbsd-351c20c593075aab5a3342f59ad7ce1e96b7b1ad.tar.xz
wireguard-openbsd-351c20c593075aab5a3342f59ad7ce1e96b7b1ad.zip
Eliminate RTHREADS kernel option in favor of a sysctl. The actual status
(not done) hasn't changed, but now it's less work to test things. ok art deraadt
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 6a9b1f57b03..7fdd5e72d2d 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.94 2010/06/10 17:54:12 deraadt Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.95 2010/06/29 00:28:14 tedu Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -402,8 +402,6 @@ sys_sched_yield(struct proc *p, void *v, register_t *retval)
return (0);
}
-#ifdef RTHREADS
-
int
sys_thrsleep(struct proc *p, void *v, register_t *revtal)
{
@@ -419,6 +417,8 @@ sys_thrsleep(struct proc *p, void *v, register_t *revtal)
long long to_ticks = 0;
int error;
+ if (!rthreads_enabled)
+ return (ENOTSUP);
if (SCARG(uap, tp) != NULL) {
struct timespec now, ats;
@@ -468,6 +468,8 @@ sys_thrwakeup(struct proc *p, void *v, register_t *retval)
struct proc *q;
int found = 0;
+ if (!rthreads_enabled)
+ return (ENOTSUP);
TAILQ_FOREACH(q, &p->p_p->ps_threads, p_thr_link) {
if (q->p_thrslpid == ident) {
wakeup_one(&q->p_thrslpid);
@@ -481,4 +483,3 @@ sys_thrwakeup(struct proc *p, void *v, register_t *retval)
return (0);
}
-#endif