summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-01-26 02:38:12 +0000
committerjulian <julian@FreeBSD.org>1999-01-26 02:38:12 +0000
commit05a22328877b551a6299973368b01a69c27c5567 (patch)
tree2d0955594e5dedfc3a72b9f38810bbe3daa8e68c /sys/kern/kern_exit.c
parent7332041031f8b27a81d26881a3601d76ede641f0 (diff)
downloadFreeBSD-src-05a22328877b551a6299973368b01a69c27c5567.zip
FreeBSD-src-05a22328877b551a6299973368b01a69c27c5567.tar.gz
Enable Linux threads support by default.
This takes the conditionals out of the code that has been tested by various people for a while. ps and friends (libkvm) will need a recompile as some proc structure changes are made. Submitted by: "Richard Seaman, Jr." <dick@tar.com>
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 7be01af..22965f5 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
- * $Id: kern_exit.c,v 1.70 1998/12/19 02:55:33 julian Exp $
+ * $Id: kern_exit.c,v 1.71 1999/01/07 21:23:41 julian Exp $
*/
#include "opt_compat.h"
@@ -73,9 +73,7 @@
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <vm/vm_zone.h>
-#ifdef COMPAT_LINUX_THREADS
#include <sys/user.h>
-#endif
static MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status");
@@ -184,9 +182,6 @@ exit1(p, rv)
*/
p->p_flag &= ~(P_TRACED | P_PPWAIT);
p->p_flag |= P_WEXIT;
-#ifndef COMPAT_LINUX_THREADS
- p->p_sigignore = ~0;
-#endif /* COMPAT_LINUX_THREADS */
p->p_siglist = 0;
if (timevalisset(&p->p_realtimer.it_value))
untimeout(realitexpire, (caddr_t)p, p->p_ithandle);
@@ -287,9 +282,7 @@ exit1(p, rv)
LIST_REMOVE(q, p_sibling);
LIST_INSERT_HEAD(&initproc->p_children, q, p_sibling);
q->p_pptr = initproc;
-#ifdef COMPAT_LINUX_THREADS
q->p_sigparent = 0;
-#endif /* COMPAT_LINUX_THREADS */
/*
* Traced processes are killed
* since their existence means someone is screwing up.
@@ -314,11 +307,7 @@ exit1(p, rv)
* flag set, notify process 1 instead (and hope it will handle
* this situation).
*/
-#ifndef COMPAT_LINUX_THREADS
- if (p->p_pptr->p_flag & P_NOCLDWAIT) {
-#else
if (p->p_pptr->p_procsig->ps_flag & P_NOCLDWAIT) {
-#endif /* COMPAT_LINUX_THREADS */
struct proc *pp = p->p_pptr;
proc_reparent(p, initproc);
/*
@@ -330,15 +319,12 @@ exit1(p, rv)
wakeup((caddr_t)pp);
}
-#ifndef COMPAT_LINUX_THREADS
- psignal(p->p_pptr, SIGCHLD);
-#else
if (p->p_sigparent && p->p_pptr != initproc) {
psignal(p->p_pptr, p->p_sigparent);
} else {
psignal(p->p_pptr, SIGCHLD);
}
-#endif /* COMPAT_LINUX_THREADS */
+
wakeup((caddr_t)p->p_pptr);
#if defined(tahoe)
/* move this to cpu_exit */
@@ -508,14 +494,13 @@ loop:
LIST_REMOVE(p, p_list); /* off zombproc */
LIST_REMOVE(p, p_sibling);
-#ifdef COMPAT_LINUX_THREADS
if (--p->p_procsig->ps_refcnt == 0) {
if (p->p_sigacts != &p->p_addr->u_sigacts)
FREE(p->p_sigacts, M_SUBPROC);
FREE(p->p_procsig, M_SUBPROC);
p->p_procsig = NULL;
}
-#endif /* COMPAT_LINUX_THREADS */
+
/*
* Give machine-dependent layer a chance
* to free anything that cpu_exit couldn't
@@ -627,7 +612,6 @@ rm_at_exit(function)
return (count);
}
-#ifdef COMPAT_LINUX_THREADS
void check_sigacts (void)
{
struct proc *p = curproc;
@@ -644,4 +628,4 @@ void check_sigacts (void)
FREE(pss, M_SUBPROC);
}
}
-#endif
+
OpenPOWER on IntegriCloud