Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Add comments saying that a cv_timedwait and sleepq_...



details:   https://anonhg.NetBSD.org/src/rev/986407a77d4b
branches:  trunk
changeset: 785314:986407a77d4b
user:      apb <apb%NetBSD.org@localhost>
date:      Fri Mar 08 08:35:09 2013 +0000

description:
Add comments saying that a cv_timedwait and sleepq_block interpret
timo = 0 as an infinite timeout.  This is already documented in the
cv_timedwait(9) man page, and there is no sleeq_block(9) man page.

diffstat:

 sys/kern/kern_condvar.c |  6 ++++--
 sys/kern/kern_sleepq.c  |  6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (54 lines):

diff -r 29874521450d -r 986407a77d4b sys/kern/kern_condvar.c
--- a/sys/kern/kern_condvar.c   Fri Mar 08 08:30:44 2013 +0000
+++ b/sys/kern/kern_condvar.c   Fri Mar 08 08:35:09 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_condvar.c,v 1.30 2011/07/27 14:35:33 uebayasi Exp $       */
+/*     $NetBSD: kern_condvar.c,v 1.31 2013/03/08 08:35:09 apb Exp $    */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.30 2011/07/27 14:35:33 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.31 2013/03/08 08:35:09 apb Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -244,6 +244,8 @@
  *     Wait on a condition variable until awoken or the specified timeout
  *     expires.  Returns zero if awoken normally or EWOULDBLOCK if the
  *     timeout expired.
+ *
+ *     timo is a timeout in ticks.  timo = 0 specifies an infinite timeout.
  */
 int
 cv_timedwait(kcondvar_t *cv, kmutex_t *mtx, int timo)
diff -r 29874521450d -r 986407a77d4b sys/kern/kern_sleepq.c
--- a/sys/kern/kern_sleepq.c    Fri Mar 08 08:30:44 2013 +0000
+++ b/sys/kern/kern_sleepq.c    Fri Mar 08 08:35:09 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sleepq.c,v 1.47 2012/07/27 05:36:13 matt Exp $    */
+/*     $NetBSD: kern_sleepq.c,v 1.48 2013/03/08 08:35:09 apb Exp $     */
 
 /*-
  * Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.47 2012/07/27 05:36:13 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.48 2013/03/08 08:35:09 apb Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -226,6 +226,8 @@
  *     After any intermediate step such as releasing an interlock, switch.
  *     sleepq_block() may return early under exceptional conditions, for
  *     example if the LWP's containing process is exiting.
+ *
+ *     timo is a timeout in ticks.  timo = 0 specifies an infinite timeout.
  */
 int
 sleepq_block(int timo, bool catch)



Home | Main Index | Thread Index | Old Index