Re: task of a group

0 views
Skip to first unread message

XingChao Wang

unread,
Dec 5, 2009, 10:07:03 PM12/5/09
to IT&LIFE---wxc200, borqs-kernel
青儿


赵小姐  孤独是可耻的
thanks
--wang xingchao


2009/12/6 XingChao Wang <wxc...@gmail.com>
/* return group to which a task belongs */
static inline struct task_group *task_group(struct task_struct *p)
{
struct task_group *tg;

#ifdef CONFIG_USER_SCHED
rcu_read_lock();
tg = __task_cred(p)->user->tg;
rcu_read_unlock();
#elif defined(CONFIG_CGROUP_SCHED)
tg = container_of(task_subsys_state(p, cpu_cgroup_subsys_id),
struct task_group, css);
#else
tg = &init_task_group;
#endif
return tg;
}

thanks
--wang xingchao

Reply all
Reply to author
Forward
0 new messages