diff options
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r-- | sys/kern/kern_synch.c | 9 |
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 |