Prepends all HAL functions with HAL_ (#146)

This commit is contained in:
Thad House
2016-07-09 00:24:26 -07:00
committed by Peter Johnson
parent 5ad28d58ec
commit b637b9ee4c
162 changed files with 2855 additions and 2747 deletions

View File

@@ -52,7 +52,7 @@ std::thread::native_handle_type Task::native_handle() {
*/
bool Task::Verify() {
TASK id = (TASK)m_thread.native_handle();
return verifyTaskID(id) == OK;
return HAL_VerifyTaskID(id) == OK;
}
/**
@@ -63,7 +63,7 @@ bool Task::Verify() {
int32_t Task::GetPriority() {
int priority;
auto id = m_thread.native_handle();
if (HandleError(getTaskPriority(&id, &priority)))
if (HandleError(HAL_GetTaskPriority(&id, &priority)))
return priority;
else
return 0;
@@ -79,7 +79,7 @@ int32_t Task::GetPriority() {
*/
bool Task::SetPriority(int32_t priority) {
auto id = m_thread.native_handle();
return HandleError(setTaskPriority(&id, priority));
return HandleError(HAL_SetTaskPriority(&id, priority));
}
/**
@@ -95,7 +95,7 @@ std::string Task::GetName() const { return m_taskName; }
bool Task::HandleError(STATUS results) {
if (results != ERROR) return true;
int errsv = errno;
if (errsv == HAL_taskLib_ILLEGAL_PRIORITY) {
if (errsv == HAL_TaskLib_ILLEGAL_PRIORITY) {
wpi_setWPIErrorWithContext(TaskPriorityError, m_taskName.c_str());
} else {
printf("ERROR: errno=%i", errsv);