On 12/09/2011 09:29 AM, Michal Privoznik wrote:
---
src/util/threads.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/util/threads.h b/src/util/threads.h
index b72610c..7d8a6ed 100644
--- a/src/util/threads.h
+++ b/src/util/threads.h
@@ -88,6 +88,11 @@ void virMutexUnlock(virMutexPtr m);
int virCondInit(virCondPtr c) ATTRIBUTE_RETURN_CHECK;
int virCondDestroy(virCondPtr c) ATTRIBUTE_RETURN_CHECK;
+/* virCondWait, virCondWaitUntil:
+ * These functions can return without associated predicate
s/without/without the/
+ * changing value. Therefore in nearly all cases there
s/there/they/
+ * should be enclosed in a while loop that checks predicate.
s/checks/checks the/
+ */
int virCondWait(virCondPtr c, virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
int virCondWaitUntil(virCondPtr c, virMutexPtr m, unsigned long long whenms)
ATTRIBUTE_RETURN_CHECK;
I'd also insert a newline here, to make it obvious that the above docs
apply just to the two Wait functions, and not also the Signal function.
void virCondSignal(virCondPtr c);
ACK with nits fixed.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org