Files
allwpilib/hal/include/HAL/Handles.h
Thad House 776a991d61 Moves Notifier over to handles (#97)
Internally, the linked list now uses shared_ptrs instead of raw
pointers. In addition, in the WPILib the notifier handle is now made
atomic. Then before the class is destructed, the handle is now set to 0.
This should help solve one of the existing race conditions. A 0 handle
is correctly handled down at the HAL level.
2016-06-05 07:29:47 -07:00

20 lines
769 B
C

/*----------------------------------------------------------------------------*/
/* 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 <stdint.h>
#define HAL_INVALID_HANDLE 0
#define HAL_HANDLE_INDEX_OUT_OF_RANGE -1
#define HAL_HANDLE_ALREADY_ALLOCATED -2
#define HAL_HANDLE_INVALID_TYPE -3
#define HAL_HANDLE_OUT_OF_HANDLES -4
#define HAL_HANDLE_NEGATIVE_INDEX -5
typedef int32_t HalHandle;