Merge "wifi(implementation): Make a boolean flag atomic" am: 5bdf7a0ef7
am: bdbc4162e3

Change-Id: Ifafb945391cf9cec56e9ed5ed884dd74db6f6f84
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index f79e62a..576dfe6 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -289,7 +289,7 @@
   // Opaque handle to be used for all wlan0 interface specific operations.
   wifi_interface_handle wlan_interface_handle_;
   // Flag to indicate if we have initiated the cleanup of legacy HAL.
-  bool awaiting_event_loop_termination_;
+  std::atomic<bool> awaiting_event_loop_termination_;
   // Flag to indicate if the legacy HAL has been started.
   bool is_started_;
   wifi_system::InterfaceTool iface_tool_;