mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 06:08:50 +00: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:
parent
a5ca940d64
commit
0ab16c6af0
4 changed files with 15 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue