diff options
author | Oleg Nesterov <oleg@redhat.com> | 2011-04-07 14:44:11 -0400 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2011-04-07 14:44:11 -0400 |
commit | e46bc9b6fd65bc9f406a4211fbf95683cc9c2937 (patch) | |
tree | 57046f6b2f4674a0c9048ab1ad1ff50fae7e373a /include/linux | |
parent | 2b9accbee563f535046ff2cd382d0acaa92e130c (diff) | |
parent | 321fb561971ba0f10ce18c0f8a4b9fbfc7cef4b9 (diff) |
Merge branch 'ptrace' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into ptrace
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sched.h | 17 | ||||
-rw-r--r-- | include/linux/tracehook.h | 27 |
2 files changed, 14 insertions, 30 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 83bd2e2982fc..3f53c25aa008 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -653,9 +653,8 @@ struct signal_struct { | |||
653 | * Bits in flags field of signal_struct. | 653 | * Bits in flags field of signal_struct. |
654 | */ | 654 | */ |
655 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ | 655 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ |
656 | #define SIGNAL_STOP_DEQUEUED 0x00000002 /* stop signal dequeued */ | 656 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ |
657 | #define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ | 657 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ |
658 | #define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ | ||
659 | /* | 658 | /* |
660 | * Pending notifications to parent. | 659 | * Pending notifications to parent. |
661 | */ | 660 | */ |
@@ -1261,6 +1260,7 @@ struct task_struct { | |||
1261 | int exit_state; | 1260 | int exit_state; |
1262 | int exit_code, exit_signal; | 1261 | int exit_code, exit_signal; |
1263 | int pdeath_signal; /* The signal sent when the parent dies */ | 1262 | int pdeath_signal; /* The signal sent when the parent dies */ |
1263 | unsigned int group_stop; /* GROUP_STOP_*, siglock protected */ | ||
1264 | /* ??? */ | 1264 | /* ??? */ |
1265 | unsigned int personality; | 1265 | unsigned int personality; |
1266 | unsigned did_exec:1; | 1266 | unsigned did_exec:1; |
@@ -1777,6 +1777,17 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1777 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | 1777 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
1778 | #define used_math() tsk_used_math(current) | 1778 | #define used_math() tsk_used_math(current) |
1779 | 1779 | ||
1780 | /* | ||
1781 | * task->group_stop flags | ||
1782 | */ | ||
1783 | #define GROUP_STOP_SIGMASK 0xffff /* signr of the last group stop */ | ||
1784 | #define GROUP_STOP_PENDING (1 << 16) /* task should stop for group stop */ | ||
1785 | #define GROUP_STOP_CONSUME (1 << 17) /* consume group stop count */ | ||
1786 | #define GROUP_STOP_TRAPPING (1 << 18) /* switching from STOPPED to TRACED */ | ||
1787 | #define GROUP_STOP_DEQUEUED (1 << 19) /* stop signal dequeued */ | ||
1788 | |||
1789 | extern void task_clear_group_stop_pending(struct task_struct *task); | ||
1790 | |||
1780 | #ifdef CONFIG_PREEMPT_RCU | 1791 | #ifdef CONFIG_PREEMPT_RCU |
1781 | 1792 | ||
1782 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1793 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 3a2e66d88a32..b073f3c8adc3 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -469,33 +469,6 @@ static inline int tracehook_get_signal(struct task_struct *task, | |||
469 | } | 469 | } |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * tracehook_notify_jctl - report about job control stop/continue | ||
473 | * @notify: zero, %CLD_STOPPED or %CLD_CONTINUED | ||
474 | * @why: %CLD_STOPPED or %CLD_CONTINUED | ||
475 | * | ||
476 | * This is called when we might call do_notify_parent_cldstop(). | ||
477 | * | ||
478 | * @notify is zero if we would not ordinarily send a %SIGCHLD, | ||
479 | * or is the %CLD_STOPPED or %CLD_CONTINUED .si_code for %SIGCHLD. | ||
480 | * | ||
481 | * @why is %CLD_STOPPED when about to stop for job control; | ||
482 | * we are already in %TASK_STOPPED state, about to call schedule(). | ||
483 | * It might also be that we have just exited (check %PF_EXITING), | ||
484 | * but need to report that a group-wide stop is complete. | ||
485 | * | ||
486 | * @why is %CLD_CONTINUED when waking up after job control stop and | ||
487 | * ready to make a delayed @notify report. | ||
488 | * | ||
489 | * Return the %CLD_* value for %SIGCHLD, or zero to generate no signal. | ||
490 | * | ||
491 | * Called with the siglock held. | ||
492 | */ | ||
493 | static inline int tracehook_notify_jctl(int notify, int why) | ||
494 | { | ||
495 | return notify ?: (current->ptrace & PT_PTRACED) ? why : 0; | ||
496 | } | ||
497 | |||
498 | /** | ||
499 | * tracehook_finish_jctl - report about return from job control stop | 472 | * tracehook_finish_jctl - report about return from job control stop |
500 | * | 473 | * |
501 | * This is called by do_signal_stop() after wakeup. | 474 | * This is called by do_signal_stop() after wakeup. |