How to set the deadline scheduler (SCHED_DEADLINE) in application code
Issue
sched_setattr()
andsched_getattr()
is provided in RHEL 8 kernel. However, calling this in application is failing and showing errors similar to the below:
test.c:133:20: error: storage size of ‘myattr’ isn’t known
struct sched_attr myattr;
^~~~~~
test.c:151:10: warning: implicit declaration of function ‘sched_setattr’; did you mean ‘sched_setparam’? [-Wimplicit-function-declaration]
ret = sched_setattr(cpid, &myattr, flags); /* Set scheduling for the new child */
^~~~~~~~~~~~~
sched_setparam
Environment
- Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.