summaryrefslogtreecommitdiff
path: root/include/apr_thread_mutex.h
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-04-07 21:17:41 +0000
committerYann Ylavic <ylavic@apache.org>2017-04-07 21:17:41 +0000
commit2ba1280f622fe7c817667c851654406ac98a7c3a (patch)
tree6ca7ed6adef12f5710251ee8ada5eaae306103a4 /include/apr_thread_mutex.h
parentedf5c6739f468d49932f13fc6ba7a10c2844d730 (diff)
downloadapr-2ba1280f622fe7c817667c851654406ac98a7c3a.tar.gz
apr_{thread,proc,global}_timedlock() with negative timeout is now equivalent
to apr_{thread,proc,global}_trylock(), i.e. immediate attempt to acquire the lock (but returning APR_TIMEUP if busy). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790632 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_thread_mutex.h')
-rw-r--r--include/apr_thread_mutex.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/apr_thread_mutex.h b/include/apr_thread_mutex.h
index 5279a9fa6..8eb617291 100644
--- a/include/apr_thread_mutex.h
+++ b/include/apr_thread_mutex.h
@@ -87,7 +87,9 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex);
* Attempt to acquire the lock for the given mutex until timeout expires.
* If the acquisition time outs, the call returns with APR_TIMEUP.
* @param mutex the mutex on which to attempt the lock acquiring.
- * @param timeout the relative timeout (microseconds)
+ * @param timeout the relative timeout (microseconds).
+ * @note A timeout negative or nul means immediate attempt, returning
+ * APR_TIMEUP without blocking if it the lock is already acquired.
*/
APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex,
apr_interval_time_t timeout);