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"
  • Method Details

    • getCurrentThreadPriority

      public static int 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

      public static boolean 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

      public static boolean setCurrentThreadPriority​(boolean realTime, int priority)
      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"