diff options
Diffstat (limited to 'src/arm/Gglobal.c')
-rw-r--r-- | src/arm/Gglobal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arm/Gglobal.c b/src/arm/Gglobal.c index 7b93fbd8..2fb1d211 100644 --- a/src/arm/Gglobal.c +++ b/src/arm/Gglobal.c @@ -26,7 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "dwarf_i.h" HIDDEN define_lock (arm_lock); -HIDDEN int tdep_init_done; +HIDDEN atomic_bool tdep_init_done = 0; /* Unwinding methods to use. See UNW_METHOD_ enums */ HIDDEN int unwi_unwind_method = UNW_ARM_METHOD_ALL; @@ -40,7 +40,7 @@ tdep_init (void) lock_acquire (&arm_lock, saved_mask); { - if (tdep_init_done) + if (atomic_load(&tdep_init_done)) /* another thread else beat us to it... */ goto out; @@ -58,7 +58,7 @@ tdep_init (void) #ifndef UNW_REMOTE_ONLY arm_local_addr_space_init (); #endif - tdep_init_done = 1; /* signal that we're initialized... */ + atomic_store(&tdep_init_done, 1); /* signal that we're initialized... */ } out: lock_release (&arm_lock, saved_mask); |