WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Threads.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2016-2017. 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 
12 #ifdef _WIN32
13 #include <windows.h>
14 #define NativeThreadHandle const HANDLE*
15 #else
16 #include <pthread.h>
17 #define NativeThreadHandle const pthread_t*
18 #endif
19 
20 extern "C" {
21 int32_t HAL_GetThreadPriority(NativeThreadHandle handle, HAL_Bool* isRealTime,
22  int32_t* status);
23 int32_t HAL_GetCurrentThreadPriority(HAL_Bool* isRealTime, int32_t* status);
24 HAL_Bool HAL_SetThreadPriority(NativeThreadHandle handle, HAL_Bool realTime,
25  int32_t priority, int32_t* status);
26 HAL_Bool HAL_SetCurrentThreadPriority(HAL_Bool realTime, int32_t priority,
27  int32_t* status);
28 }