Source-Changes-HG archive

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

[src/trunk]: src/sys tsleep() on lbolt is now illegal. Convert cv_wakeup(&lb...



details:   https://anonhg.NetBSD.org/src/rev/9e9b80294e68
branches:  trunk
changeset: 749689:9e9b80294e68
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Dec 05 22:38:19 2009 +0000

description:
tsleep() on lbolt is now illegal.  Convert cv_wakeup(&lbolt) to
cv_broadcast(&lbolt) and get rid of the prior.

diffstat:

 sys/kern/kern_condvar.c |  19 ++-----------------
 sys/kern/kern_synch.c   |   6 +++---
 sys/sys/condvar.h       |   4 +---
 3 files changed, 6 insertions(+), 23 deletions(-)

diffs (84 lines):

diff -r f425e8f85296 -r 9e9b80294e68 sys/kern/kern_condvar.c
--- a/sys/kern/kern_condvar.c   Sat Dec 05 22:34:43 2009 +0000
+++ b/sys/kern/kern_condvar.c   Sat Dec 05 22:38:19 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_condvar.c,v 1.27 2009/10/21 21:12:06 rmind Exp $  */
+/*     $NetBSD: kern_condvar.c,v 1.28 2009/12/05 22:38:19 pooka 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.27 2009/10/21 21:12:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_condvar.c,v 1.28 2009/12/05 22:38:19 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -365,21 +365,6 @@
 }
 
 /*
- * cv_wakeup:
- *
- *     Wake all LWPs waiting on a condition variable.  For cases
- *     where the address may be waited on by mtsleep()/tsleep().
- *     Not a documented call.
- */
-void
-cv_wakeup(kcondvar_t *cv)
-{
-
-       cv_wakeup_all(cv);
-       wakeup(cv);
-}
-
-/*
  * cv_has_waiters:
  *
  *     For diagnostic assertions: return non-zero if a condition
diff -r f425e8f85296 -r 9e9b80294e68 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c     Sat Dec 05 22:34:43 2009 +0000
+++ b/sys/kern/kern_synch.c     Sat Dec 05 22:38:19 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_synch.c,v 1.272 2009/12/05 22:34:43 pooka Exp $   */
+/*     $NetBSD: kern_synch.c,v 1.273 2009/12/05 22:38:19 pooka Exp $   */
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.272 2009/12/05 22:34:43 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.273 2009/12/05 22:38:19 pooka Exp $");
 
 #include "opt_kstack.h"
 #include "opt_perfctrs.h"
@@ -1211,6 +1211,6 @@
        }
        mutex_exit(proc_lock);
        uvm_meter();
-       cv_wakeup(&lbolt);
+       cv_broadcast(&lbolt);
        callout_schedule(&sched_pstats_ch, hz);
 }
diff -r f425e8f85296 -r 9e9b80294e68 sys/sys/condvar.h
--- a/sys/sys/condvar.h Sat Dec 05 22:34:43 2009 +0000
+++ b/sys/sys/condvar.h Sat Dec 05 22:38:19 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: condvar.h,v 1.11 2008/12/19 07:57:28 thorpej Exp $     */
+/*     $NetBSD: condvar.h,v 1.12 2009/12/05 22:38:19 pooka Exp $       */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -51,8 +51,6 @@
 void   cv_signal(kcondvar_t *);
 void   cv_broadcast(kcondvar_t *);
 
-void   cv_wakeup(kcondvar_t *);
-
 bool   cv_has_waiters(kcondvar_t *);
 bool   cv_is_valid(kcondvar_t *);
 



Home | Main Index | Thread Index | Old Index