summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-02-06 20:25:24 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-06 20:25:24 -0800
commit8eae299835cf161a93a5acd890cebf0f83f2a2ce (patch)
tree36e8d2c6717ac5b716b87fbcc6847924c2271691 /include/linux/sched.h
parentfef31b0354eeec8ce9c71c7adcf08848c25727f6 (diff)
Split up "struct signal_struct" into "signal" and "sighand" parts.
This is required to get make the old LinuxThread semantics work together with the fixed-for-POSIX full signal sharing. A traditional CLONE_SIGHAND thread (LinuxThread) will not see any other shared signal state, while a new-style CLONE_THREAD thread will share all of it. This way the two methods don't confuse each other.
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d41f7a24fc14..78970007590f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -220,10 +220,21 @@ struct mm_struct {
extern int mmlist_nr;
-struct signal_struct {
+struct sighand_struct {
atomic_t count;
struct k_sigaction action[_NSIG];
spinlock_t siglock;
+};
+
+/*
+ * NOTE! "signal_struct" does not have it's own
+ * locking, because a shared signal_struct always
+ * implies a shared sighand_struct, so locking
+ * sighand_struct is always a proper superset of
+ * the locking of signal_struct.
+ */
+struct signal_struct {
+ atomic_t count;
/* current thread group signal load-balancing target: */
task_t *curr_target;
@@ -378,7 +389,8 @@ struct task_struct {
/* namespace */
struct namespace *namespace;
/* signal handlers */
- struct signal_struct *sig;
+ struct signal_struct *signal;
+ struct sighand_struct *sighand;
sigset_t blocked, real_blocked;
struct sigpending pending;
@@ -589,6 +601,8 @@ extern void exit_thread(void);
extern void exit_mm(struct task_struct *);
extern void exit_files(struct task_struct *);
+extern void exit_signal(struct task_struct *);
+extern void __exit_signal(struct task_struct *);
extern void exit_sighand(struct task_struct *);
extern void __exit_sighand(struct task_struct *);