Removes the task class from wpilib (#314)

Was required back on the cRIO, but there are much better alternatives
nowadays.
This commit is contained in:
Thad House
2016-11-01 20:12:08 -07:00
committed by Peter Johnson
parent bc492bb40e
commit 9bbdaf300b
15 changed files with 17 additions and 316 deletions

View File

@@ -33,7 +33,6 @@
#include "HAL/SPI.h"
#include "HAL/SerialPort.h"
#include "HAL/Solenoid.h"
#include "HAL/Task.h"
#include "HAL/Types.h"
namespace HALUsageReporting = nUsageReporting;

View File

@@ -1,43 +0,0 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2016. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <pthread.h>
#include <stdint.h>
#ifndef _STATUS_DEFINED
#define _STATUS_DEFINED
typedef int32_t STATUS;
#endif /* _STATUS_DEFINED */
#ifndef OK
#define OK 0
#endif /* OK */
#ifndef ERROR
#define ERROR (-1)
#endif /* ERROR */
typedef pthread_t* TASK;
#ifdef __cplusplus
extern "C" {
#endif
// Note: These constants used to be declared extern and were defined in
// Task.cpp. This caused issues with the JNI bindings for java, and so the
// instantiations were moved here.
const int32_t HAL_TaskLib_ILLEGAL_PRIORITY = 22; // 22 is EINVAL
STATUS HAL_VerifyTaskID(TASK task);
// valid priority [1..99]
STATUS HAL_SetTaskPriority(TASK task, int32_t priority);
STATUS HAL_GetTaskPriority(TASK task, int32_t* priority);
#ifdef __cplusplus
}
#endif