-
Philippe Gerum authored
This code enables support for binding threads from the Linux SCHED_FIFO/RR scheduling classes to the Xenomai domain as members of the SCHED_WEAK class, with up to 100 priority levels from [0..99] included. When enabled, SCHED_WEAK is the low priority class of the Xenomai system, providing no real-time guarantee. Members from the SCHED_WEAK class are weakly scheduled by Xenomai, only for the purpose of synchronizing with real-time threads from other scheduling classes. However, they cannot compete for CPU resources with real-time threads, and leave the primary domain upon return from Xenomai syscalls automatically (*). This feature is an extension of Xenomai's special handling of SCHED_OTHER threads, to the SCHED_FIFO/RR POSIX classes from a regular Linux kernel. If disabled, SCHED_WEAK is interpreted as an alias to SCHED_OTHER by the Xenomai scheduler, restricted to priority 0. Conversely, SCHED_OTHER threads are eventually members of Xenomai's SCHED_WEAK class at priority 0, when this feature is enabled. In the wake of the SCHED_WEAK introduction, automatic propagation of updates to the Xenomai scheduling parameters to linux/libc via the SIGSHADOW_RENICE signal has been removed. (*) Like with SCHED_OTHER, Xenomai assumes no real-time requirement for SCHED_WEAK threads. Therefore, they are automatically moved back to secondary mode upon return from a Xenomai syscall, unless they hold a mutex, which would defer the transition until the mutex is released.
3667859d