diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 21349173d148..1941d8b5cf11 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1062,12 +1062,6 @@ struct task_struct { | |||
1062 | #endif | 1062 | #endif |
1063 | 1063 | ||
1064 | struct list_head tasks; | 1064 | struct list_head tasks; |
1065 | /* | ||
1066 | * ptrace_list/ptrace_children forms the list of my children | ||
1067 | * that were stolen by a ptracer. | ||
1068 | */ | ||
1069 | struct list_head ptrace_children; | ||
1070 | struct list_head ptrace_list; | ||
1071 | 1065 | ||
1072 | struct mm_struct *mm, *active_mm; | 1066 | struct mm_struct *mm, *active_mm; |
1073 | 1067 | ||
@@ -1089,18 +1083,25 @@ struct task_struct { | |||
1089 | /* | 1083 | /* |
1090 | * pointers to (original) parent process, youngest child, younger sibling, | 1084 | * pointers to (original) parent process, youngest child, younger sibling, |
1091 | * older sibling, respectively. (p->father can be replaced with | 1085 | * older sibling, respectively. (p->father can be replaced with |
1092 | * p->parent->pid) | 1086 | * p->real_parent->pid) |
1093 | */ | 1087 | */ |
1094 | struct task_struct *real_parent; /* real parent process (when being debugged) */ | 1088 | struct task_struct *real_parent; /* real parent process */ |
1095 | struct task_struct *parent; /* parent process */ | 1089 | struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */ |
1096 | /* | 1090 | /* |
1097 | * children/sibling forms the list of my children plus the | 1091 | * children/sibling forms the list of my natural children |
1098 | * tasks I'm ptracing. | ||
1099 | */ | 1092 | */ |
1100 | struct list_head children; /* list of my children */ | 1093 | struct list_head children; /* list of my children */ |
1101 | struct list_head sibling; /* linkage in my parent's children list */ | 1094 | struct list_head sibling; /* linkage in my parent's children list */ |
1102 | struct task_struct *group_leader; /* threadgroup leader */ | 1095 | struct task_struct *group_leader; /* threadgroup leader */ |
1103 | 1096 | ||
1097 | /* | ||
1098 | * ptraced is the list of tasks this task is using ptrace on. | ||
1099 | * This includes both natural children and PTRACE_ATTACH targets. | ||
1100 | * p->ptrace_entry is p's link on the p->parent->ptraced list. | ||
1101 | */ | ||
1102 | struct list_head ptraced; | ||
1103 | struct list_head ptrace_entry; | ||
1104 | |||
1104 | /* PID/PID hash table linkage. */ | 1105 | /* PID/PID hash table linkage. */ |
1105 | struct pid_link pids[PIDTYPE_MAX]; | 1106 | struct pid_link pids[PIDTYPE_MAX]; |
1106 | struct list_head thread_group; | 1107 | struct list_head thread_group; |
@@ -1494,6 +1495,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1494 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1495 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
1495 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1496 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
1496 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ | 1497 | #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ |
1498 | #define PF_FREEZER_NOSIG 0x80000000 /* Freezer won't send signals to it */ | ||
1497 | 1499 | ||
1498 | /* | 1500 | /* |
1499 | * Only the _current_ task can read/write to tsk->flags, but other | 1501 | * Only the _current_ task can read/write to tsk->flags, but other |
@@ -1875,9 +1877,6 @@ extern void wait_task_inactive(struct task_struct * p); | |||
1875 | #define wait_task_inactive(p) do { } while (0) | 1877 | #define wait_task_inactive(p) do { } while (0) |
1876 | #endif | 1878 | #endif |
1877 | 1879 | ||
1878 | #define remove_parent(p) list_del_init(&(p)->sibling) | ||
1879 | #define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children) | ||
1880 | |||
1881 | #define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) | 1880 | #define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) |
1882 | 1881 | ||
1883 | #define for_each_process(p) \ | 1882 | #define for_each_process(p) \ |