From 9071ff2465cacd57ae0b462ca21eb491758bb932 Mon Sep 17 00:00:00 2001 From: hvlad Date: Thu, 10 Sep 2009 06:40:52 +0000 Subject: [PATCH] Use volatile for better thread-safety, noted by Adriano --- src/jrd/extds/ExtDS.cpp | 2 +- src/jrd/extds/ExtDS.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jrd/extds/ExtDS.cpp b/src/jrd/extds/ExtDS.cpp index c9cd0651c2..3d939813b0 100644 --- a/src/jrd/extds/ExtDS.cpp +++ b/src/jrd/extds/ExtDS.cpp @@ -54,7 +54,7 @@ namespace EDS { GlobalPtr Manager::manager; Mutex Manager::m_mutex; Provider* Manager::m_providers = NULL; -bool Manager::m_initialized = false; +volatile bool Manager::m_initialized = false; Manager::Manager(MemoryPool& pool) : PermanentStorage(pool) diff --git a/src/jrd/extds/ExtDS.h b/src/jrd/extds/ExtDS.h index 9028ae3c4e..dad7b8229e 100644 --- a/src/jrd/extds/ExtDS.h +++ b/src/jrd/extds/ExtDS.h @@ -77,7 +77,7 @@ private: static Firebird::GlobalPtr manager; static Firebird::Mutex m_mutex; static Provider* m_providers; - static bool m_initialized; + static volatile bool m_initialized; };