PluginManager: port to std::atomic

This commit is contained in:
Gregory Hainaut 2016-02-22 20:17:43 +01:00
parent 97cc468509
commit 34826c9506
2 changed files with 3 additions and 3 deletions

View File

@ -1213,7 +1213,7 @@ void SysCorePlugins::Open()
if (GSopen2) GetMTGS().WaitForOpen();
if( !AtomicExchange( m_mcdOpen, true ) )
if( !m_mcdOpen.exchange(true) )
{
DbgCon.Indent().WriteLn( "Opening Memorycards");
OpenPlugin_Mcd();
@ -1313,7 +1313,7 @@ void SysCorePlugins::Close()
Console.WriteLn( Color_StrongBlue, "Closing plugins..." );
if( AtomicExchange( m_mcdOpen, false ) )
if( m_mcdOpen.exchange(false) )
{
DbgCon.Indent().WriteLn( "Closing Memorycards");
ClosePlugin_Mcd();

View File

@ -295,7 +295,7 @@ protected:
Threading::MutexRecursive m_mtx_PluginStatus;
// Lovely hack until the new PS2E API is completed.
volatile u32 m_mcdOpen;
std::atomic<bool> m_mcdOpen;
public: // hack until we unsuck plugins...
std::unique_ptr<PluginStatus_t> m_info[PluginId_AllocCount];