WPILibC++  2020.3.2
Threads.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include "hal/Types.h"
11 
18 typedef const void* NativeThreadHandle;
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
33 int32_t HAL_GetThreadPriority(NativeThreadHandle handle, HAL_Bool* isRealTime,
34  int32_t* status);
35 
45 int32_t HAL_GetCurrentThreadPriority(HAL_Bool* isRealTime, int32_t* status);
46 
58 HAL_Bool HAL_SetThreadPriority(NativeThreadHandle handle, HAL_Bool realTime,
59  int32_t priority, int32_t* status);
60 
72 HAL_Bool HAL_SetCurrentThreadPriority(HAL_Bool realTime, int32_t priority,
73  int32_t* status);
74 
75 #ifdef __cplusplus
76 } // extern "C"
77 #endif
78 
HAL_GetCurrentThreadPriority
int32_t HAL_GetCurrentThreadPriority(HAL_Bool *isRealTime, int32_t *status)
Gets the thread priority for the current thread.
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.
HAL_GetThreadPriority
int32_t HAL_GetThreadPriority(NativeThreadHandle handle, HAL_Bool *isRealTime, int32_t *status)
Gets the thread priority for the specified thread.
HAL_SetCurrentThreadPriority
HAL_Bool HAL_SetCurrentThreadPriority(HAL_Bool realTime, int32_t priority, int32_t *status)
Sets the thread priority for the current thread.