Package edu.wpi.first.hal
Class ThreadsJNI
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.ThreadsJNI
Threads HAL JNI Functions.
- See Also:
-
- "Threads.h"
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.hal.JNIWrapper
JNIWrapper.Helper
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Gets the real-time status for the current thread.static int
Gets the thread priority for the current thread.static boolean
setCurrentThreadPriority
(boolean realTime, int priority) Sets the thread priority for the current thread.Methods inherited from class edu.wpi.first.hal.JNIWrapper
forceLoad, suppressUnused
-
Method Details
-
getCurrentThreadPriority
Gets the thread priority for the current thread.- Returns:
- The current thread priority. For real-time, this is 1-99 with 99 being highest. For non-real-time, this is 0. See "man 7 sched" for details.
- See Also:
-
- "HAL_GetCurrentThreadPriority"
-
getCurrentThreadIsRealTime
Gets the real-time status for the current thread.- Returns:
- Set to true if thread is real-time, otherwise false.
- See Also:
-
- "HAL_GetCurrentThreadPriority"
-
setCurrentThreadPriority
Sets the thread priority for the current thread.- Parameters:
realTime
- Set to true to set a real-time priority, false for standard priority.priority
- Priority to set the thread to. For real-time, this is 1-99 with 99 being highest. For non-real-time, this is forced to 0. See "man 7 sched" for more details.- Returns:
- True on success.
- See Also:
-
- "HAL_SetCurrentThreadPriority"
-