Atomic operations library.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3775 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2009-07-13 05:38:34 +00:00
parent 3070e159c6
commit d779554ff3
10 changed files with 258 additions and 115 deletions

View File

@ -72,18 +72,6 @@
namespace Common
{
// MemFence: Neither the compiler nor the CPU can reorder memory accesses
// beyond this barrier.
#ifdef _WIN32
__forceinline void MemFence()
{
MemoryBarrier();
}
#else
// TODO: UNIX experts, please implement the memory fence.
void MemFence();
#endif
class CriticalSection
{
#ifdef _WIN32
@ -206,10 +194,6 @@ void SleepCurrentThread(int ms);
void SetCurrentThreadName(const char *name);
LONG SyncInterlockedExchangeAdd(LONG *Dest, LONG Val);
LONG SyncInterlockedExchange(LONG *Dest, LONG Val);
LONG SyncInterlockedIncrement(LONG *Dest);
} // namespace Common
#endif // _THREAD_H_