WPILibC++  2020.3.2-60-g3011ebe
Threads Functions

Functions

int32_t HAL_GetThreadPriority (NativeThreadHandle handle, HAL_Bool *isRealTime, int32_t *status)
 Gets the thread priority for the specified thread. More...
 
int32_t HAL_GetCurrentThreadPriority (HAL_Bool *isRealTime, int32_t *status)
 Gets the thread priority for the current thread. More...
 
HAL_Bool HAL_SetThreadPriority (NativeThreadHandle handle, HAL_Bool realTime, int32_t priority, int32_t *status)
 Sets the thread priority for the specified thread. More...
 
HAL_Bool HAL_SetCurrentThreadPriority (HAL_Bool realTime, int32_t priority, int32_t *status)
 Sets the thread priority for the current thread. More...
 

Variables

const typedef void * NativeThreadHandle
 

Detailed Description

Function Documentation

◆ HAL_GetCurrentThreadPriority()

int32_t HAL_GetCurrentThreadPriority ( HAL_Bool *  isRealTime,
int32_t *  status 
)

Gets the thread priority for the current thread.

Parameters
handleNative handle pointer to the thread to get the priority for
isRealTimeSet to true if thread is realtime, otherwise false
statusError status variable. 0 on success
Returns
The current thread priority. Scaled 1-99, with 1 being highest.

◆ HAL_GetThreadPriority()

int32_t HAL_GetThreadPriority ( NativeThreadHandle  handle,
HAL_Bool *  isRealTime,
int32_t *  status 
)

Gets the thread priority for the specified thread.

Parameters
handleNative handle pointer to the thread to get the priority for
isRealTimeSet to true if thread is realtime, otherwise false
statusError status variable. 0 on success
Returns
The current thread priority. Scaled 1-99, with 1 being highest.

◆ HAL_SetCurrentThreadPriority()

HAL_Bool HAL_SetCurrentThreadPriority ( HAL_Bool  realTime,
int32_t  priority,
int32_t *  status 
)

Sets the thread priority for the current thread.

Parameters
threadReference to the thread to set the priority of
realTimeSet to true to set a realtime priority, false for standard priority
priorityPriority to set the thread to. Scaled 1-99, with 1 being highest
statusError status variable. 0 on success
Returns
The success state of setting the priority

◆ HAL_SetThreadPriority()

HAL_Bool HAL_SetThreadPriority ( NativeThreadHandle  handle,
HAL_Bool  realTime,
int32_t  priority,
int32_t *  status 
)

Sets the thread priority for the specified thread.

Parameters
threadReference to the thread to set the priority of
realTimeSet to true to set a realtime priority, false for standard priority
priorityPriority to set the thread to. Scaled 1-99, with 1 being highest
statusError status variable. 0 on success
Returns
The success state of setting the priority