Re: [PATCH 1/2] threads: Document spurious wakeups on virCondWait

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]