mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Protect dvdread with a critical section, should fix crashes when running ikaruga from a compressed iso. Some coding standard stuff.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@672 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -49,13 +49,13 @@ class CriticalSection
|
||||
#elif __GNUC__
|
||||
pthread_mutex_t mutex;
|
||||
#endif
|
||||
public:
|
||||
public:
|
||||
|
||||
CriticalSection(int spincount = 1000);
|
||||
~CriticalSection();
|
||||
void Enter();
|
||||
bool TryEnter();
|
||||
void Leave();
|
||||
CriticalSection(int spincount = 1000);
|
||||
~CriticalSection();
|
||||
void Enter();
|
||||
bool TryEnter();
|
||||
void Leave();
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -66,23 +66,22 @@ typedef void* (*ThreadFunc)(void* arg);
|
||||
|
||||
class Thread
|
||||
{
|
||||
public:
|
||||
public:
|
||||
Thread(ThreadFunc entry, void* arg);
|
||||
~Thread();
|
||||
|
||||
Thread(ThreadFunc entry, void* arg);
|
||||
~Thread();
|
||||
|
||||
void WaitForDeath();
|
||||
void SetAffinity(int mask);
|
||||
static void SetCurrentThreadAffinity(int mask);
|
||||
void WaitForDeath();
|
||||
void SetAffinity(int mask);
|
||||
static void SetCurrentThreadAffinity(int mask);
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
#ifdef _WIN32
|
||||
HANDLE m_hThread;
|
||||
DWORD m_threadId;
|
||||
HANDLE m_hThread;
|
||||
DWORD m_threadId;
|
||||
#elif __GNUC__
|
||||
pthread_t thread_id;
|
||||
pthread_t thread_id;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user