diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2008-12-16 07:57:29 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2008-12-16 07:57:29 +0000 |
commit | 66f602cf3edb31a30ff3fcee9bd3d4b9d4ff57a7 (patch) | |
tree | 446062b72d3d878e3dd07d974267043287dbbd8b /sys/kern/kern_prot.c | |
parent | 799c9944fa8bbbc14aab0bb61b58d2823678bc31 (diff) |
Move the functionality of psignal() to a new function ptsignal()
that takes an additional argument "type" that indicates whether the
signal is for the process, just a particular thread, or propagated
to a thread because it's not caught or blocked. psignal() becomes
a wrapper that does the first of those.
So that sys_kill() can tell apart signals for the process and signals
for the process's original thread, the tid of the original thread
is defined as its pid + THREAD_PID_OFFSET.
ok tedu@ art@ andreas@ kurt@ "better early than late" deraadt@
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 4b0185952e2..993f45445ba 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_prot.c,v 1.37 2008/11/01 05:59:21 deraadt Exp $ */ +/* $OpenBSD: kern_prot.c,v 1.38 2008/12/16 07:57:28 guenther Exp $ */ /* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */ /* @@ -77,7 +77,7 @@ sys_getthrid(p, v, retval) register_t *retval; { - *retval = p->p_pid; + *retval = p->p_pid + (p->p_flag & P_THREAD ? 0 : THREAD_PID_OFFSET); return (0); } #endif |