mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01: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:
@@ -259,6 +259,7 @@ void HAL_SetNotifierAlarm(HAL_NotifierHandle notifierHandle, uint64_t alarmTime,
|
||||
|
||||
if (ack) {
|
||||
notifier->handlerSignaled.clear();
|
||||
wpi::util::ResetSignalObject(notifierHandle);
|
||||
}
|
||||
|
||||
if (!absolute) {
|
||||
@@ -291,6 +292,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});
|
||||
@@ -305,6 +307,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