Module Name:    src
Committed By:   apb
Date:           Fri Mar  8 08:35:09 UTC 2013

Modified Files:
        src/sys/kern: kern_condvar.c kern_sleepq.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.47 -r1.48 src/sys/kern/kern_sleepq.c

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

Modified files:

Index: src/sys/kern/kern_condvar.c
diff -u src/sys/kern/kern_condvar.c:1.30 src/sys/kern/kern_condvar.c:1.31
--- src/sys/kern/kern_condvar.c:1.30	Wed Jul 27 14:35:33 2011
+++ src/sys/kern/kern_condvar.c	Fri Mar  8 08:35:09 2013
@@ -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 @@ cv_wait_sig(kcondvar_t *cv, kmutex_t *mt
  *	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)

Index: src/sys/kern/kern_sleepq.c
diff -u src/sys/kern/kern_sleepq.c:1.47 src/sys/kern/kern_sleepq.c:1.48
--- src/sys/kern/kern_sleepq.c:1.47	Fri Jul 27 05:36:13 2012
+++ src/sys/kern/kern_sleepq.c	Fri Mar  8 08:35:09 2013
@@ -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 @@ sleepq_enqueue(sleepq_t *sq, wchan_t wch
  *	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)

Reply via email to