mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Get rid of locks added InterlockedExchangeAdd function in thread.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@748 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -344,6 +344,17 @@ void Event::Wait()
|
||||
is_set_ = false;
|
||||
pthread_mutex_unlock(&mutex_);
|
||||
}
|
||||
|
||||
int InterlockedExchangeAdd( int* Addend, int Increment )
|
||||
{
|
||||
|
||||
#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
|
||||
return __sync_add_and_fetch(Addend, Increment);
|
||||
#else
|
||||
// TODO support old gcc
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user