diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llthread.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llthread.cpp b/linden/indra/llcommon/llthread.cpp index b39ffb6..60ccd5c 100644 --- a/linden/indra/llcommon/llthread.cpp +++ b/linden/indra/llcommon/llthread.cpp | |||
@@ -322,6 +322,17 @@ bool LLMutex::isLocked() | |||
322 | } | 322 | } |
323 | } | 323 | } |
324 | 324 | ||
325 | //trys to grab a lock and if sucessful returns true | ||
326 | bool LLMutex::tryLock() | ||
327 | { | ||
328 | apr_status_t status = apr_thread_mutex_trylock(mAPRMutexp); | ||
329 | if (APR_STATUS_IS_EBUSY(status)) | ||
330 | { | ||
331 | return false; | ||
332 | } | ||
333 | return true; | ||
334 | } | ||
335 | |||
325 | //============================================================================ | 336 | //============================================================================ |
326 | 337 | ||
327 | LLCondition::LLCondition(apr_pool_t *poolp) : | 338 | LLCondition::LLCondition(apr_pool_t *poolp) : |