From ac5ccb45b76a287b08e6602e4c04c7668d603957 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Tue, 6 Mar 2018 03:43:06 -0600 Subject: [PATCH] Use atomic variable for Runtime ref_count_. Change-Id: Ic4d0ad9ff93d0cc52cfe2df006ee3436d5960b07 --- runtime/hsa-runtime/core/inc/runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/hsa-runtime/core/inc/runtime.h b/runtime/hsa-runtime/core/inc/runtime.h index ac0d4e8d31..d1aed4e26c 100644 --- a/runtime/hsa-runtime/core/inc/runtime.h +++ b/runtime/hsa-runtime/core/inc/runtime.h @@ -510,7 +510,7 @@ class Runtime { void* vm_fault_handler_user_data_; // Holds reference count to runtime object. - volatile uint32_t ref_count_; + std::atomic ref_count_; // Track environment variables. Flag flag_;