Added silc_mutex_trylock
[runtime.git] / lib / silcutil / silcmutex.h
index 878d37deb8fdf4f9365aa7f67f9ce25140028cdf..2ff79f39c15e42cd39c04241c5aa8339c0436bec 100644 (file)
@@ -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