mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Notifier: Reset signal object on ack (#8466)
This is needed to avoid spurious wakeups in WaitForObject due to a previous alarm having set the signal object.
This commit is contained in:
@@ -185,6 +185,7 @@ void HAL_SetNotifierAlarm(HAL_NotifierHandle notifierHandle, uint64_t alarmTime,
|
||||
|
||||
if (ack) {
|
||||
notifier->handlerSignaled.clear();
|
||||
wpi::util::ResetSignalObject(notifierHandle);
|
||||
}
|
||||
|
||||
if (!absolute) {
|
||||
@@ -217,6 +218,7 @@ void HAL_CancelNotifierAlarm(HAL_NotifierHandle notifierHandle, HAL_Bool ack,
|
||||
|
||||
if (ack) {
|
||||
notifier->handlerSignaled.clear();
|
||||
wpi::util::ResetSignalObject(notifierHandle);
|
||||
}
|
||||
|
||||
thr->m_alarmQueue.remove({notifierHandle, notifier});
|
||||
@@ -231,6 +233,7 @@ void HAL_AcknowledgeNotifierAlarm(HAL_NotifierHandle notifierHandle,
|
||||
return;
|
||||
}
|
||||
notifier->handlerSignaled.clear();
|
||||
wpi::util::ResetSignalObject(notifierHandle);
|
||||
}
|
||||
|
||||
int32_t HAL_GetNotifierOverrun(HAL_NotifierHandle notifierHandle,
|
||||
|
||||
Reference in New Issue
Block a user