Miscellaneous scheduling related topics
We close this chapter with a couple of miscellaneous yet useful topic mentions.
A few small (kernel space) routines to check out
Here are a few kernel routines you may find useful (we leave it to you to look up the details and sample usage within the kernel):
rt_prio()
: Given the priority as a parameter, returns a Boolean to indicate whether it’s a real-time task or not.rt_task()
: Based on the priority value of the task, given the task structure pointer as a parameter, returns a Boolean to indicate whether it’s a real-time task or not (a wrapper overrt_prio()
).task_is_realtime()
: Similar, but based on the scheduling policy of the task. Given the task structure pointer as a parameter, returns a Boolean to indicate whether it’s a real-time task or not.
As the above routines all fall within a header (include/linux/sched/rt.h
), simply include it and directly use them within your module...