mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Added InterlockedExchange to Linux side
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1018 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -358,6 +358,15 @@ int InterlockedExchangeAdd(int *Addend, int Increment)
|
||||
return result + Increment;
|
||||
#endif
|
||||
}
|
||||
int InterlockedExchange(int *Addend, int Increment)
|
||||
{
|
||||
#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
|
||||
return __sync_lock_test_and_set(Addend, Increment);
|
||||
#else
|
||||
// TODO:
|
||||
#warning Support older GCC Versions
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user