Home > front end >  Find oldest child (not sibling) of a process (task_struct)
Find oldest child (not sibling) of a process (task_struct)

Time:10-07

From this post and this codebase, I know that there are pointers for

  1. Youngest child
  2. Youngest sibling
  3. Oldest sibling.

So with Oldest child, how do I get?

I am thinking of access "children" pointer (current->children) and traverse to the end of that doubly linked list.

CodePudding user response:

Get the oldest sibling of the youngest child:

current->p_cptr->p_osptr
  • Related