Source-Changes-HG archive

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

[src/trunk]: src/share/man/man9 Add a note about setting the timeout to zero ...



details:   https://anonhg.NetBSD.org/src/rev/379d8ac8717f
branches:  trunk
changeset: 971745:379d8ac8717f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 03 04:05:28 2020 +0000

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

diffstat:

 share/man/man9/condvar.9 |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 488d3965467d -r 379d8ac8717f share/man/man9/condvar.9
--- a/share/man/man9/condvar.9  Sun May 03 04:05:00 2020 +0000
+++ b/share/man/man9/condvar.9  Sun May 03 04:05:28 2020 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index