From 351c20c593075aab5a3342f59ad7ce1e96b7b1ad Mon Sep 17 00:00:00 2001 From: tedu Date: Tue, 29 Jun 2010 00:28:14 +0000 Subject: 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 --- sys/kern/kern_synch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/kern/kern_synch.c') 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 -- cgit v1.2.3-59-g8ed1b