Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9141881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:42:14+00:00 2026-06-17T09:42:14+00:00

I am writing a system call which should store some info for the process

  • 0

I am writing a system call which should store some info for the process that called it,for its oldest children process and for its oldest sibling process.

I know that the information i want is kept in sched.h in the task_struct and i have managed to store info for the process that called the system call from the fields i wanted from the struct task_struct.

My problem with the oldest children and the oldest sibling is that in the struct task_struct there are two lists which have all the children and all the siblings (if i have understood right).I assume that i have to iterate through those lists and find the last element.But if i find the last element on those lists how can i access their task_struct?

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:42:15+00:00Added an answer on June 17, 2026 at 9:42 am

    task_struct has pointers to youngest child, younger sibling and older sibling. These pointers points to the respective task_struct s . *p_cptr, *p_ysptr, *p_osptr in task_struct points to youngest child, younger sibling and older sibling respectively. For example current->p_cptr simply points to the youngest child,where current is the pointer to the task_struct of the process currently running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been writing a system that at runtime generates some templates, and then generates
As a system administrator I find myself many times writing scripts that call command
I'm writing a Vim plugin. I need to call a binary which should be
I am writing a system which requires me to fetch the values of properties
We are writing an inventory system and I have some questions about sqlalchemy (postgresql)
I'm writing a particle system manager with SlimDX/D3D11, and I'm finding some problems with
I'm writing something that summarizes the files in a file system by hashing a
I have an NHibernate Transaction that does some work and makes a call to
I writing a Linux system call map for the radare2 debugger. This means providing
I am writing an app which performs some tests and produces a number of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.