apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r551966 - /apr/apr/trunk/include/apr_thread_cond.h
Date Fri, 29 Jun 2007 17:20:50 GMT
Author: davi
Date: Fri Jun 29 10:20:49 2007
New Revision: 551966

URL: http://svn.apache.org/viewvc?view=rev&rev=551966
Log:
Update the CV docs to add a few remarks. PR: 40971.

Modified:
    apr/apr/trunk/include/apr_thread_cond.h

Modified: apr/apr/trunk/include/apr_thread_cond.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_thread_cond.h?view=diff&rev=551966&r1=551965&r2=551966
==============================================================================
--- apr/apr/trunk/include/apr_thread_cond.h (original)
+++ apr/apr/trunk/include/apr_thread_cond.h Fri Jun 29 10:20:49 2007
@@ -54,7 +54,7 @@
  * and schedule threads in a single process.
  * @param cond the memory address where the newly created condition variable
  *        will be stored.
- * @param pool the pool from which to allocate the mutex.
+ * @param pool the pool from which to allocate the condition.
  */
 APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
                                                  apr_pool_t *pool);
@@ -70,6 +70,9 @@
  * @param mutex the mutex that must be locked upon entering this function,
  *        is released while the thread is asleep, and is again acquired before
  *        returning from this function.
+ * @remark Spurious wakeups may occur. Before and after every call to wait on
+ * a condition variable, the caller should test whether the condition is already
+ * met.
  */
 APR_DECLARE(apr_status_t) apr_thread_cond_wait(apr_thread_cond_t *cond,
                                                apr_thread_mutex_t *mutex);
@@ -100,6 +103,7 @@
  * the associated mutex. Although it is not required, if predictable scheduling
  * is desired, that mutex must be locked while calling this function.
  * @param cond the condition variable on which to produce the signal.
+ * @remark If no threads are waiting on the condition variable, nothing happens.
  */
 APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond);
 
@@ -108,6 +112,7 @@
  * Each thread that was signaled is then scheduled to wake up and acquire
  * the associated mutex. This will happen in a serialized manner.
  * @param cond the condition variable on which to produce the broadcast.
+ * @remark If no threads are waiting on the condition variable, nothing happens.
  */
 APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond);
 



Mime
View raw message