From d32a43f464d9f2906dde4acbb8dc437362d58d85 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Tue, 14 Mar 2017 08:30:45 -0700 Subject: [PATCH] wifi(implementation): Make a boolean flag atomic The flag |awaiting_event_loop_termination_| is accessed by multiple threads, so make it atomic. Bug: 33552618 Test: Compiles Change-Id: I5ebe27fe88672565aae0daf34a89616d36f35f90 --- wifi/1.0/default/wifi_legacy_hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h index f79e62a962..576dfe6f09 100644 --- a/wifi/1.0/default/wifi_legacy_hal.h +++ b/wifi/1.0/default/wifi_legacy_hal.h @@ -289,7 +289,7 @@ class WifiLegacyHal { // 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 awaiting_event_loop_termination_; // Flag to indicate if the legacy HAL has been started. bool is_started_; wifi_system::InterfaceTool iface_tool_;