WPILibC++ 2023.4.3
Threads Functions

Typedefs

typedef const void * NativeThreadHandle
 

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...
 

Detailed Description

Typedef Documentation

◆ NativeThreadHandle

typedef const void* NativeThreadHandle

Function Documentation

◆ HAL_GetCurrentThreadPriority()

int32_t HAL_GetCurrentThreadPriority ( HAL_Bool isRealTime,
int32_t *  status 
)

Gets the thread priority for the current thread.

Parameters
[out]isRealTimeSet to true if thread is real-time, otherwise false.
[out]statusError status variable. 0 on success.
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.

◆ HAL_GetThreadPriority()

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

Gets the thread priority for the specified thread.

Parameters
[in]handleNative handle pointer to the thread to get the priority for.
[out]isRealTimeSet to true if thread is real-time, otherwise false.
[out]statusError status variable. 0 on success.
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.

◆ HAL_SetCurrentThreadPriority()

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

Sets the thread priority for the current thread.

Parameters
[in]realTimeSet to true to set a real-time priority, false for standard priority.
[in]priorityPriority 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.
[out]statusError status variable. 0 on success.
Returns
True on success.

◆ 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
[in]handleReference to the thread to set the priority of.
[in]realTimeSet to true to set a real-time priority, false for standard priority.
[in]priorityPriority 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.
[out]statusError status variable. 0 on success.
Returns
True on success.