Apply u-ra's patch to speed up CriticalSection on systems that use POSIX-threads (that is, not windows).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6242 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
1450385a53
commit
2a64643fdc
|
@ -318,9 +318,13 @@ namespace Common
|
|||
|
||||
void CriticalSection::Enter()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
int ret = pthread_mutex_lock(&mutex);
|
||||
if (ret) ERROR_LOG(COMMON, "%s: pthread_mutex_lock(%p) failed: %s\n",
|
||||
__FUNCTION__, &mutex, strerror(ret));
|
||||
#else
|
||||
pthread_mutex_lock(&mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -332,9 +336,13 @@ namespace Common
|
|||
|
||||
void CriticalSection::Leave()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
int ret = pthread_mutex_unlock(&mutex);
|
||||
if (ret) ERROR_LOG(COMMON, "%s: pthread_mutex_unlock(%p) failed: %s\n",
|
||||
__FUNCTION__, &mutex, strerror(ret));
|
||||
#else
|
||||
pthread_mutex_unlock(&mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue