Package edu.wpi.first.hal
Class ThreadsJNI
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.ThreadsJNI
public class ThreadsJNI extends JNIWrapper
Threads HAL JNI Functions.
- See Also:
- "Threads.h"
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description static boolean
getCurrentThreadIsRealTime()
Gets the real-time status for the current thread.static int
getCurrentThreadPriority()
Gets the thread priority for the current thread.static boolean
setCurrentThreadPriority(boolean realTime, int priority)
Sets the thread priority for the current thread.
-
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"
-