pthread_mutexattr_t's must be initialized before the type can be set.
Fixes issue 4243. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7344 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
commit
bfe7b028ce
|
@ -56,6 +56,7 @@ public:
|
|||
InitializeCriticalSection(&m_handle);
|
||||
#else
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&m_handle, &attr);
|
||||
#endif
|
||||
|
@ -157,17 +158,16 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
// TryAcquireSRWLockExclusive requires Windows 7!!
|
||||
bool try_lock()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return (0 != TryAcquireSRWLockExclusive(&m_handle));
|
||||
// XXX TryAcquireSRWLockExclusive requires Windows 7!
|
||||
// return (0 != TryAcquireSRWLockExclusive(&m_handle));
|
||||
return false;
|
||||
#else
|
||||
return !pthread_mutex_trylock(&m_handle);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
native_handle_type native_handle()
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ files = [
|
|||
'Src/HW/DSPLLE/DSPDebugInterface.cpp',
|
||||
'Src/HW/DSPLLE/DSPHost.cpp',
|
||||
'Src/HW/DSPLLE/DSPLLE.cpp',
|
||||
'Src/HW/DSPLLE/DSPLLEGlobals.cpp',
|
||||
#'Src/HW/DSPLLE/DSPLLEGlobals.cpp',
|
||||
'Src/HW/DSPLLE/DSPLLETools.cpp',
|
||||
'Src/HW/DSPLLE/DSPSymbols.cpp',
|
||||
'Src/HW/DVDInterface.cpp',
|
||||
|
|
Loading…
Reference in New Issue