mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
6264cdcc2b
commit
653a347dd2
8 changed files with 112 additions and 112 deletions
|
|
@ -176,7 +176,7 @@ void Thread::sleep (int millisecs) throw()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
CriticalSection::CriticalSection() throw()
|
||||
JUCE_CALLTYPE CriticalSection::CriticalSection() throw()
|
||||
{
|
||||
pthread_mutexattr_t atts;
|
||||
pthread_mutexattr_init (&atts);
|
||||
|
|
@ -184,22 +184,22 @@ CriticalSection::CriticalSection() throw()
|
|||
pthread_mutex_init (&internal, &atts);
|
||||
}
|
||||
|
||||
CriticalSection::~CriticalSection() throw()
|
||||
JUCE_CALLTYPE CriticalSection::~CriticalSection() throw()
|
||||
{
|
||||
pthread_mutex_destroy (&internal);
|
||||
}
|
||||
|
||||
void CriticalSection::enter() const throw()
|
||||
void JUCE_CALLTYPE CriticalSection::enter() const throw()
|
||||
{
|
||||
pthread_mutex_lock (&internal);
|
||||
}
|
||||
|
||||
bool CriticalSection::tryEnter() const throw()
|
||||
bool JUCE_CALLTYPE CriticalSection::tryEnter() const throw()
|
||||
{
|
||||
return pthread_mutex_trylock (&internal) == 0;
|
||||
}
|
||||
|
||||
void CriticalSection::exit() const throw()
|
||||
void JUCE_CALLTYPE CriticalSection::exit() const throw()
|
||||
{
|
||||
pthread_mutex_unlock (&internal);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ BEGIN_JUCE_NAMESPACE
|
|||
|
||||
|
||||
//==============================================================================
|
||||
CriticalSection::CriticalSection() throw()
|
||||
JUCE_CALLTYPE CriticalSection::CriticalSection() throw()
|
||||
{
|
||||
pthread_mutexattr_t atts;
|
||||
pthread_mutexattr_init (&atts);
|
||||
|
|
@ -55,22 +55,22 @@ CriticalSection::CriticalSection() throw()
|
|||
pthread_mutex_init (&internal, &atts);
|
||||
}
|
||||
|
||||
CriticalSection::~CriticalSection() throw()
|
||||
JUCE_CALLTYPE CriticalSection::~CriticalSection() throw()
|
||||
{
|
||||
pthread_mutex_destroy (&internal);
|
||||
}
|
||||
|
||||
void CriticalSection::enter() const throw()
|
||||
void JUCE_CALLTYPE CriticalSection::enter() const throw()
|
||||
{
|
||||
pthread_mutex_lock (&internal);
|
||||
}
|
||||
|
||||
bool CriticalSection::tryEnter() const throw()
|
||||
bool JUCE_CALLTYPE CriticalSection::tryEnter() const throw()
|
||||
{
|
||||
return pthread_mutex_trylock (&internal) == 0;
|
||||
}
|
||||
|
||||
void CriticalSection::exit() const throw()
|
||||
void JUCE_CALLTYPE CriticalSection::exit() const throw()
|
||||
{
|
||||
pthread_mutex_unlock (&internal);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ extern HWND juce_messageWindowHandle;
|
|||
|
||||
|
||||
//==============================================================================
|
||||
CriticalSection::CriticalSection() throw()
|
||||
JUCE_CALLTYPE CriticalSection::CriticalSection() throw()
|
||||
{
|
||||
// (just to check the MS haven't changed this structure and broken things...)
|
||||
#if _MSC_VER >= 1400
|
||||
|
|
@ -69,22 +69,22 @@ CriticalSection::CriticalSection() throw()
|
|||
InitializeCriticalSection ((CRITICAL_SECTION*) internal);
|
||||
}
|
||||
|
||||
CriticalSection::~CriticalSection() throw()
|
||||
JUCE_CALLTYPE CriticalSection::~CriticalSection() throw()
|
||||
{
|
||||
DeleteCriticalSection ((CRITICAL_SECTION*) internal);
|
||||
}
|
||||
|
||||
void CriticalSection::enter() const throw()
|
||||
void JUCE_CALLTYPE CriticalSection::enter() const throw()
|
||||
{
|
||||
EnterCriticalSection ((CRITICAL_SECTION*) internal);
|
||||
}
|
||||
|
||||
bool CriticalSection::tryEnter() const throw()
|
||||
bool JUCE_CALLTYPE CriticalSection::tryEnter() const throw()
|
||||
{
|
||||
return TryEnterCriticalSection ((CRITICAL_SECTION*) internal) != FALSE;
|
||||
}
|
||||
|
||||
void CriticalSection::exit() const throw()
|
||||
void JUCE_CALLTYPE CriticalSection::exit() const throw()
|
||||
{
|
||||
LeaveCriticalSection ((CRITICAL_SECTION*) internal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue