I am new in LKD and I was reading book by Robert Love. I stuck in understand one concept as follow.
Similarly, it is possible to iterate over a process’s children with
struct task_struct *task;
struct list_head *list;
list_for_each(list, ¤t->children) {
task = list_entry(list, struct task_struct, sibling);
/* task now points to one of current’s children */
}
Also I would be great if somebody explain the list_entry arguments work?
I am having difficult in understanding above code snippet specially list_for_each
works.