summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2013-04-06 03:44:35 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2013-04-06 03:44:35 +0000
commit04ff2520e057b83fe5cb80138f167e448942ba37 (patch)
tree1f5dcf4f86fefb5dd9cca75ffddccb545069e18a
parent03b666be8e4acddbeb33e7aea3deb0993d61332b (diff)
rthreads are always enabled. remove the sysctl.
ok deraadt guenther kettenis matthew
-rw-r--r--sys/kern/kern_exit.c5
-rw-r--r--sys/kern/kern_fork.c4
-rw-r--r--sys/kern/kern_prot.c4
-rw-r--r--sys/kern/kern_synch.c10
-rw-r--r--sys/kern/kern_sysctl.c7
-rw-r--r--sys/sys/sysctl.h6
-rw-r--r--sys/sys/systm.h4
7 files changed, 10 insertions, 30 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;
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 8cbea892b6f..e91308bd9c8 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.h,v 1.131 2013/03/24 00:09:31 tedu Exp $ */
+/* $OpenBSD: sysctl.h,v 1.132 2013/04/06 03:44:34 tedu Exp $ */
/* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */
/*
@@ -174,7 +174,7 @@ struct ctlname {
#define KERN_CPTIME2 71 /* array: cp_time2 */
#define KERN_CACHEPCT 72 /* buffer cache % of physmem */
#define KERN_FILE2 73 /* struct: file entries */
-#define KERN_RTHREADS 74 /* kernel rthreads support enabled */
+/* was define KERN_RTHREADS 74 */
#define KERN_CONSDEV 75 /* dev_t: console terminal device */
#define KERN_NETLIVELOCKS 76 /* int: number of network livelocks */
#define KERN_POOL_DEBUG 77 /* int: enable pool_debug */
@@ -256,7 +256,7 @@ struct ctlname {
{ "cp_time2", CTLTYPE_STRUCT }, \
{ "bufcachepercent", CTLTYPE_INT }, \
{ "file2", CTLTYPE_STRUCT }, \
- { "rthreads", CTLTYPE_INT }, \
+ { "gap", 0 }, \
{ "consdev", CTLTYPE_STRUCT }, \
{ "netlivelocks", CTLTYPE_INT }, \
{ "pool_debug", CTLTYPE_INT }, \
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 70164114f10..0d463310f02 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: systm.h,v 1.96 2013/03/28 16:41:39 tedu Exp $ */
+/* $OpenBSD: systm.h,v 1.97 2013/04/06 03:44:34 tedu Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
@@ -110,8 +110,6 @@ struct proc;
struct process;
#define curproc curcpu()->ci_curproc
-extern int rthreads_enabled;
-
typedef int sy_call_t(struct proc *, void *, register_t *);
extern struct sysent { /* system call table */