--- linuxsampler/trunk/src/common/Mutex.cpp 2004/07/01 02:30:50 164 +++ linuxsampler/trunk/src/common/Mutex.cpp 2004/07/01 04:25:55 165 @@ -40,6 +40,12 @@ pthread_mutex_lock(&__posix_mutex); } +bool Mutex::Trylock() { + if (pthread_mutex_trylock(&__posix_mutex) == EBUSY) + return false; + return true; +} + void Mutex::Unlock() { pthread_mutex_unlock(&__posix_mutex); }