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

  • SEARCH
  • Home
  • 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 6821073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:30:05+00:00 2026-05-26T21:30:05+00:00

I did some of the modification in sched_setschedule() function of the linux kernel. successfully

  • 0

I did some of the modification in sched_setschedule() function of the linux kernel. successfully recompiled and build it. Now when i try to use sched_setschedule() in my C program (using gcc) i noticed that the header gcc is picking is completely different from the header file which i modified to compile the kernel.

in this case

gcc is picking up the <sched.h> header located in usual place /usr/include/sched.h

in which the func prototype is defined as below

extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
     __THROW;

while the kernel version have it in /usr/src/linux-headers-2.6.35-23

extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);

How these two header are related or mapped to each other? In other words how does change in kernel function prototype is cascaded back to gcc library (header files)?

  • 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-05-26T21:30:06+00:00Added an answer on May 26, 2026 at 9:30 pm

    Kernel functions don’t like directly to user-space code. Instead, there’s a thick layer that goes through the system call interface. This is done by glibc. The header in /usr/include belongs to the glibc headers. It seems that you are trying to extend the official scheduler interface, however that would also require you to modify and/or extend glibc itself, which I’m guessing wasn’t your original intention. Also, if you’d ever want to give this kernel module to anyone else, the other person would also need to replace his version of glibc which includes run-time binaries and/or compiler time headers.

    You can write your own version of the sched_setparam system call without depending on sched.h at all, see man 2 syscall.

    An alternative approach would be to extend the kernel without modifying existing interfaces, but instead creating new ones. There are handful of resources of how to add a new /proc or /sys files and wrap them up in new, separate libraries.

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

Sidebar

Related Questions

I did some googling to try to answer this question but even after that
Why did some processor manifacturers decide to use Little endian Big endian Middle endian
A while ago I did some work in Qt for C++; now I'm working
I've got an Open Source project tracked with Hg. A collegue did some modification
Did some searches here & on the 'net and haven't found a good answer
Did some googling and couldn't find a clear answer on this. My assumption is
I did some tests a while ago and never figured out how to make
I did some HTTP monitoring with WireShark. Are there more tools like this that
I did some timing tests and also read some articles like this one (last
I did some testing with floating point calculations to minimize the precision loss. I

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.