mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #1211 from PCSX2/atomix-fetch-correction
Core|Common: restore old interlocked add/sub behavior
This commit is contained in:
commit
883963232f
|
@ -120,7 +120,7 @@ Threading::Mutex::~Mutex() throw()
|
|||
|
||||
Threading::MutexRecursive::MutexRecursive() : Mutex( false )
|
||||
{
|
||||
if( _attr_refcount.fetch_add(1) == 1 )
|
||||
if( ++_attr_refcount == 1 )
|
||||
{
|
||||
if( 0 != pthread_mutexattr_init( &_attr_recursive ) )
|
||||
throw Exception::OutOfMemory(L"Recursive mutexing attributes");
|
||||
|
@ -134,7 +134,7 @@ Threading::MutexRecursive::MutexRecursive() : Mutex( false )
|
|||
|
||||
Threading::MutexRecursive::~MutexRecursive() throw()
|
||||
{
|
||||
if( _attr_refcount.fetch_sub(1) == 0 )
|
||||
if( --_attr_refcount == 0 )
|
||||
pthread_mutexattr_destroy( &_attr_recursive );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue