process_group()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We currently have:

	
	static inline pid_t process_group(struct task_struct *tsk)
	{
		return tsk->signal->pgrp;
	}
and

	static inline struct pid *task_pgrp(struct task_struct *task)
	{
		return task->group_leader->pids[PIDTYPE_PGID].pid;
	}

and we are replacing process_group() with task_pgrp() and eventually
plan to remove process_group().

But there are several places in the kernel where we interact with
user space using a pid_t (obvious being sys_setpgid(), sys_getpgid()
do_task_stat(), do_wait() etc).

In all these places, process_group(p) would simply be replaced by
pid_nr(task_pgrp(p)). Rather than do that same replacement in many
places, can we keep the interface and change the implmenation to:

	static inline pid_t process_group(struct task_struct *tsk)
	{
		return pid_nr(task_pgrp(tsk));
	}

i.e our ultimate goal is not really to remove process_group() but
actually to remove the caching of pid_t in signal->pgrp right ?

The above disussion is also valid for process_session()/task_session().


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux