The existing code determines the available priority range once and caches the return values of sched_get_priority_min()/sched_get_priority_max().
The proposed fix (implemented by the patch) creates a helper thread (this happens only a single time, i.e., when the the epicsThreads facility is initialized) which takes the above min/max values as a starting point for a binary search for the maximal priority that can be set on the system.
The existing code determines the available priority range once and caches the return values of sched_get_ priority_ min()/sched_ get_priority_ max().
The proposed fix (implemented by the patch) creates a helper thread (this happens only a single time, i.e., when the the epicsThreads facility is initialized) which takes the above min/max values as a starting point for a binary search for the maximal priority that can be set on the system.