mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
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.
25 lines
1.1 KiB
C
25 lines
1.1 KiB
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>
|
|
|
|
#include "Handles.h"
|
|
|
|
typedef HalHandle HalNotifierHandle;
|
|
|
|
extern "C" {
|
|
HalNotifierHandle initializeNotifier(void (*process)(uint64_t, void*),
|
|
void* param, int32_t* status);
|
|
void cleanNotifier(HalNotifierHandle notifier_handle, int32_t* status);
|
|
void* getNotifierParam(HalNotifierHandle notifier_handle, int32_t* status);
|
|
void updateNotifierAlarm(HalNotifierHandle notifier_handle,
|
|
uint64_t triggerTime, int32_t* status);
|
|
void stopNotifierAlarm(HalNotifierHandle notifier_handle, int32_t* status);
|
|
}
|