X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcmutex.h;h=2ff79f39c15e42cd39c04241c5aa8339c0436bec;hp=878d37deb8fdf4f9365aa7f67f9ce25140028cdf;hb=631f1669539aaa58b8c49c4d431930f7ab68a633;hpb=ccdddda33bec54d464d667dbf05fb2307e8a7e87 diff --git a/lib/silcutil/silcmutex.h b/lib/silcutil/silcmutex.h index 878d37de..2ff79f39 100644 --- a/lib/silcutil/silcmutex.h +++ b/lib/silcutil/silcmutex.h @@ -133,6 +133,22 @@ void silc_mutex_lock(SilcMutex mutex); ***/ void silc_mutex_unlock(SilcMutex mutex); +/****f* silcutil/silc_mutex_trylock + * + * SYNOPSIS + * + * SilcBool silc_mutex_trylock(SilcMutex mutex); + * + * DESCRIPTION + * + * Attempts to lock the `mutex'. Returns TRUE if the caller was able + * to acquire the lock and FALSE if the mutex is already locked. If the + * mutex is already locked the caller cannot acquire the lock at this + * time. + * + ***/ +SilcBool silc_mutex_trylock(SilcMutex mutex); + /****f* silcutil/silc_mutex_assert_locked * * SYNOPSIS