Where can i find the definition of the "struct list_head children; /* list of my children */" which is used in sched.h to keep the children of a process?
I need to access the task_struct for a specific child but i don't know how to get a pointer to that and i don't know what the fields of the list of children are...
Thank you i advance.
2
votes
1 Answers
2
votes
I think i found the solution with a little research on the net.I post it for anyone interested on this.
struct task_struct *task;
struct list_head *list;list_for_each(list, ¤t->children) {
task = list_entry(list, struct task_struct, children); /* task now points to one of current's children */
}
include/linux
it will be quite apparent where list_head is defined :) – KevinDTimm