mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-25 02:04:23 +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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue