diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-04-06 03:44:35 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-04-06 03:44:35 +0000 |
commit | 04ff2520e057b83fe5cb80138f167e448942ba37 (patch) | |
tree | 1f5dcf4f86fefb5dd9cca75ffddccb545069e18a /sys/kern | |
parent | 03b666be8e4acddbeb33e7aea3deb0993d61332b (diff) |
rthreads are always enabled. remove the sysctl.
ok deraadt guenther kettenis matthew
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exit.c | 5 | ||||
-rw-r--r-- | sys/kern/kern_fork.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_prot.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_synch.c | 10 | ||||
-rw-r--r-- | sys/kern/kern_sysctl.c | 7 |
5 files changed, 6 insertions, 24 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index c63330165ac..3f3cc981fb5 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.121 2013/03/30 06:32:25 tedu Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.122 2013/04/06 03:44:34 tedu Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -96,9 +96,6 @@ sys___threxit(struct proc *p, void *v, register_t *retval) syscallarg(pid_t *) notdead; } */ *uap = v; - if (!rthreads_enabled) - return (EINVAL); - if (SCARG(uap, notdead) != NULL) { pid_t zero = 0; if (copyout(&zero, SCARG(uap, notdead), sizeof(zero))) { diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 02bc078a951..fbe7dcf19d4 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.145 2013/03/14 21:38:22 tedu Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.146 2013/04/06 03:44:34 tedu Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -243,8 +243,6 @@ fork1(struct proc *curp, int exitsig, int flags, void *stack, pid_t *tidptr, /* sanity check some flag combinations */ if (flags & FORK_THREAD) { - if (!rthreads_enabled) - return (ENOTSUP); if ((flags & (FORK_SIGHAND | FORK_NOZOMBIE)) != (FORK_SIGHAND | FORK_NOZOMBIE)) return (EINVAL); diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0cff5251972..6a42a3a61b5 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_prot.c,v 1.55 2012/10/01 00:08:42 guenther Exp $ */ +/* $OpenBSD: kern_prot.c,v 1.56 2013/04/06 03:44:34 tedu Exp $ */ /* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */ /* @@ -72,8 +72,6 @@ int sys_getthrid(struct proc *p, void *v, register_t *retval) { - if (!rthreads_enabled) - return (ENOTSUP); *retval = p->p_pid + THREAD_PID_OFFSET; return (0); } diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index f1db615348b..ebbdcc70f05 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_synch.c,v 1.104 2012/08/21 19:51:58 haesbaert Exp $ */ +/* $OpenBSD: kern_synch.c,v 1.105 2013/04/06 03:44:34 tedu Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /* @@ -409,10 +409,6 @@ sys___thrsleep(struct proc *p, void *v, register_t *retval) long long to_ticks = 0; int abort, error; - if (!rthreads_enabled) { - *retval = ENOTSUP; - return (0); - } if (ident == 0) { *retval = EINVAL; return (0); @@ -496,9 +492,7 @@ sys___thrwakeup(struct proc *p, void *v, register_t *retval) struct proc *q; int found = 0; - if (!rthreads_enabled) - *retval = ENOTSUP; - else if (ident == 0) + if (ident == 0) *retval = EINVAL; else { TAILQ_FOREACH(q, &p->p_p->ps_threads, p_thr_link) { diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index d0560f54e28..00967454af0 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.233 2013/03/23 21:22:20 tedu Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.234 2013/04/06 03:44:34 tedu Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -129,8 +129,6 @@ int (*cpu_cpuspeed)(int *); void (*cpu_setperf)(int); int perflevel = 100; -int rthreads_enabled = 1; - /* * Lock to avoid too many processes vslocking a large amount of memory * at the same time. @@ -565,9 +563,6 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, case KERN_CPTIME2: return (sysctl_cptime2(name + 1, namelen -1, oldp, oldlenp, newp, newlen)); - case KERN_RTHREADS: - return (sysctl_int(oldp, oldlenp, newp, newlen, - &rthreads_enabled)); case KERN_CACHEPCT: { u_int64_t dmapages; int opct, pgs; |