pid: Implement PIDTYPE_TGID
Everywhere except in the pid array we distinguish between a tasks pid and
a tasks tgid (thread group id). Even in the enumeration we want that
distinction sometimes so we have added __PIDTYPE_TGID. With leader_pid
we almost have an implementation of PIDTYPE_TGID in struct signal_struct.
Add PIDTYPE_TGID as a first class member of the pid_type enumeration and
into the pids array. Then remove the __PIDTYPE_TGID special case and the
leader_pid in signal_struct.
The net size increase is just an extra pointer added to struct pid and
an extra pair of pointers of an hlist_node added to task_struct.
The effect on code maintenance is the removal of a number of special
cases today and the potential to remove many more special cases as
PIDTYPE_TGID gets used to it's fullest. The long term potential
is allowing zombie thread group leaders to exit, which will remove
a lot more special cases in the code.
Signed-off-by:
"Eric W. Biederman" <ebiederm@xmission.com>
Showing
- arch/ia64/kernel/asm-offsets.c 1 addition, 1 deletionarch/ia64/kernel/asm-offsets.c
- arch/ia64/kernel/fsys.S 2 additions, 2 deletionsarch/ia64/kernel/fsys.S
- arch/s390/kernel/perf_cpum_sf.c 1 addition, 1 deletionarch/s390/kernel/perf_cpum_sf.c
- fs/exec.c 1 addition, 0 deletionsfs/exec.c
- include/linux/pid.h 1 addition, 2 deletionsinclude/linux/pid.h
- include/linux/sched.h 2 additions, 2 deletionsinclude/linux/sched.h
- include/linux/sched/signal.h 2 additions, 3 deletionsinclude/linux/sched/signal.h
- init/init_task.c 1 addition, 1 deletioninit/init_task.c
- kernel/events/core.c 1 addition, 1 deletionkernel/events/core.c
- kernel/exit.c 1 addition, 0 deletionskernel/exit.c
- kernel/fork.c 2 additions, 1 deletionkernel/fork.c
- kernel/pid.c 0 additions, 2 deletionskernel/pid.c
- kernel/time/itimer.c 3 additions, 2 deletionskernel/time/itimer.c
- kernel/time/posix-cpu-timers.c 1 addition, 1 deletionkernel/time/posix-cpu-timers.c
Loading
Please register or sign in to comment