mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fix RT priority docs (NFC) (#3098)
The ranges and which value was specified as highest were incorrect on some of them. On Linux, the range is 1 to 99 with 99 being highest. From `man 7 sched`: ``` Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in the range 1 (low) to 99 (high). ``` Also clean up the relevant javadoc and doxygen comments.
This commit is contained in:
@@ -55,7 +55,7 @@ void SetProcessorAffinity(int32_t core_id) {
|
||||
|
||||
void SetThreadRealtimePriorityOrDie(int32_t priority) {
|
||||
struct sched_param param;
|
||||
// Set realtime priority for this thread
|
||||
// Set real-time priority for this thread
|
||||
param.sched_priority = priority + sched_get_priority_min(SCHED_RR);
|
||||
ASSERT_EQ(pthread_setschedparam(pthread_self(), SCHED_RR, ¶m), 0)
|
||||
<< ": Failed to set scheduler priority.";
|
||||
|
||||
Reference in New Issue
Block a user