Module Name:    src
Committed By:   riastradh
Date:           Sun May  3 04:05:29 UTC 2020

Modified Files:
        src/share/man/man9: condvar.9

Log Message:
Add a note about setting the timeout to zero _and_ returning success.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/share/man/man9/condvar.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/condvar.9
diff -u src/share/man/man9/condvar.9:1.24 src/share/man/man9/condvar.9:1.25
--- src/share/man/man9/condvar.9:1.24	Sun May  3 04:05:00 2020
+++ src/share/man/man9/condvar.9	Sun May  3 04:05:28 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: condvar.9,v 1.24 2020/05/03 04:05:00 riastradh Exp $
+.\"	$NetBSD: condvar.9,v 1.25 2020/05/03 04:05:28 riastradh Exp $
 .\"
 .\" Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -230,6 +230,19 @@ subtract the time elapsed from
 .Fa bt
 in place, or set it to zero if there is no time remaining.
 .Pp
+Note that
+.Fn cv_timedwaitbt
+and
+.Fn cv_timedwaitbt_sig
+may return zero indicating success, rather than
+.Er EWOULDBLOCK ,
+even if they set the timeout to zero; this means that the caller must
+re-check the condition in order to avoid potentially losing a
+.Fn cv_signal ,
+but the
+.Em next
+wait will time out immediately.
+.Pp
 The hint
 .Fa epsilon ,
 which can be

Reply via email to