How to set the deadline scheduler (SCHED_DEADLINE) in application code

Solution In Progress - Updated -

Issue

  • sched_setattr() and sched_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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content