From 8b78c4c39817a6d8be34ce02b4cd7562333c8f57 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Fri, 2 Mar 2018 14:36:58 -0500 Subject: [PATCH] HAL Notifier: Don't disable the notifier manager when the last handle is cleaned up - Addresses #959, but not a good long term solution --- hal/src/main/native/athena/Notifier.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hal/src/main/native/athena/Notifier.cpp b/hal/src/main/native/athena/Notifier.cpp index 10aa0d2b3e3..6a3c1acdc28 100644 --- a/hal/src/main/native/athena/Notifier.cpp +++ b/hal/src/main/native/athena/Notifier.cpp @@ -169,13 +169,17 @@ void HAL_CleanNotifier(HAL_NotifierHandle notifierHandle, int32_t* status) { // the notifier can call back into our callback, so don't hold the lock // here (the atomic fetch_sub will prevent multiple parallel entries // into this function) - if (notifierAlarm) notifierAlarm->writeEnable(false, status); - if (notifierManager) notifierManager->disable(status); - std::lock_guard lock(notifierMutex); - notifierAlarm = nullptr; - notifierManager = nullptr; - closestTrigger = UINT64_MAX; + // Cleaning up the manager takes up to a second to complete, so don't do + // that here. Fix it more permanently in 2019... + + // if (notifierAlarm) notifierAlarm->writeEnable(false, status); + // if (notifierManager) notifierManager->disable(status); + + // std::lock_guard lock(notifierMutex); + // notifierAlarm = nullptr; + // notifierManager = nullptr; + // closestTrigger = UINT64_MAX; } }