aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorLuoqi Chen <luoqi@FreeBSD.org>1999-10-11 20:33:17 +0000
committerLuoqi Chen <luoqi@FreeBSD.org>1999-10-11 20:33:17 +0000
commit645682fd40b5855a1dfbca5ddb330dda7cf5ddc0 (patch)
tree7cad9d7dad8a4c0a9a157153dada2dbbd270e491 /sys/sys/proc.h
parent456b2f80635b3455ab32f16fa5460146f93583c8 (diff)
downloadsrc-645682fd40b5855a1dfbca5ddb330dda7cf5ddc0.tar.gz
src-645682fd40b5855a1dfbca5ddb330dda7cf5ddc0.zip
Add a per-signal flag to mark handlers registered with osigaction, so we
can provide the correct context to each signal handler. Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde). Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads. Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag. Reviewed by: marcel, jdp, bde
Notes
Notes: svn path=/head/; revision=52140
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index f3cee6604450..8144a46fe6cf 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -85,6 +85,9 @@ struct procsig {
int ps_refcnt;
};
+#define PS_NOCLDWAIT 0x0001 /* No zombies if child dies */
+#define PS_NOCLDSTOP 0x0002 /* No SIGCHLD when children stop. */
+
/*
* pasleep structure, used by asleep() syscall to hold requested priority
* and timeout values for await().
@@ -197,6 +200,7 @@ struct proc {
#define p_startcopy p_sigmask
sigset_t p_sigmask; /* Current signal mask. */
+ stack_t p_sigstk; /* sp & on stack state variable */
u_char p_priority; /* Process priority. */
u_char p_usrpri; /* User-priority based on p_cpu and p_nice. */
char p_nice; /* Process "nice" value. */
@@ -240,7 +244,6 @@ struct proc {
#define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock. */
#define P_CONTROLT 0x00002 /* Has a controlling terminal. */
#define P_INMEM 0x00004 /* Loaded into memory. */
-#define P_NOCLDSTOP 0x00008 /* No SIGCHLD when children stop. */
#define P_PPWAIT 0x00010 /* Parent is waiting for child to exec/exit. */
#define P_PROFIL 0x00020 /* Has started profiling. */
#define P_SELECT 0x00040 /* Selecting; wakeup/waiting danger. */
@@ -264,14 +267,14 @@ struct proc {
#define P_SWAPINREQ 0x80000 /* Swapin request due to wakeup */
/* Marked a kernel thread */
-#define P_BUFEXHAUST 0x100000 /* dirty buffers flush is in progress */
-#define P_KTHREADP 0x200000 /* Process is really a kernel thread */
+#define P_BUFEXHAUST 0x100000 /* dirty buffers flush is in progress */
+#define P_KTHREADP 0x200000 /* Process is really a kernel thread */
-#define P_NOCLDWAIT 0x400000 /* No zombies if child dies */
-#define P_DEADLKTREAT 0x800000 /* lock aquisition - deadlock treatment */
+#define P_DEADLKTREAT 0x800000 /* lock aquisition - deadlock treatment */
-#define P_JAILED 0x1000000 /* Process is in jail */
-#define P_NEWSIGSET 0x2000000 /* Process uses new sigset_t */
+#define P_JAILED 0x1000000 /* Process is in jail */
+#define P_OLDMASK 0x2000000 /* need to restore mask before pause */
+#define P_ALTSTACK 0x4000000 /* have alternate signal stack */
/*
* MOVE TO ucred.h?