Source-Changes-HG archive

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

[src/trunk]: src/sys Make sleepq_wake() type void. The return value hasn't b...



details:   https://anonhg.NetBSD.org/src/rev/5affeb050856
branches:  trunk
changeset: 795675:5affeb050856
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Apr 24 12:04:28 2014 +0000

description:
Make sleepq_wake() type void.  The return value hasn't been used in
almost 6 years.  Even if it were, returning an arbitrary lwp is a bit
of a wonky interface and can really work only when expected == 1.

diffstat:

 sys/kern/kern_sleepq.c             |  7 +++----
 sys/rump/librump/rumpkern/sleepq.c |  7 +++----
 sys/sys/sleepq.h                   |  4 ++--
 3 files changed, 8 insertions(+), 10 deletions(-)

diffs (88 lines):

diff -r d411c0e1bdb9 -r 5affeb050856 sys/kern/kern_sleepq.c
--- a/sys/kern/kern_sleepq.c    Thu Apr 24 11:58:04 2014 +0000
+++ b/sys/kern/kern_sleepq.c    Thu Apr 24 12:04:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sleepq.c,v 1.48 2013/03/08 08:35:09 apb Exp $     */
+/*     $NetBSD: kern_sleepq.c,v 1.49 2014/04/24 12:04:28 pooka 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.48 2013/03/08 08:35:09 apb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.49 2014/04/24 12:04:28 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -307,7 +307,7 @@
  *
  *     Wake zero or more LWPs blocked on a single wait channel.
  */
-lwp_t *
+void
 sleepq_wake(sleepq_t *sq, wchan_t wchan, u_int expected, kmutex_t *mp)
 {
        lwp_t *l, *next;
@@ -326,7 +326,6 @@
        }
 
        mutex_spin_exit(mp);
-       return l;
 }
 
 /*
diff -r d411c0e1bdb9 -r 5affeb050856 sys/rump/librump/rumpkern/sleepq.c
--- a/sys/rump/librump/rumpkern/sleepq.c        Thu Apr 24 11:58:04 2014 +0000
+++ b/sys/rump/librump/rumpkern/sleepq.c        Thu Apr 24 12:04:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sleepq.c,v 1.15 2014/04/24 11:56:11 pooka Exp $        */
+/*     $NetBSD: sleepq.c,v 1.16 2014/04/24 12:04:28 pooka Exp $        */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.15 2014/04/24 11:56:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.16 2014/04/24 12:04:28 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -99,7 +99,7 @@
        return error;
 }
 
-lwp_t *
+void
 sleepq_wake(sleepq_t *sq, wchan_t wchan, u_int expected, kmutex_t *mp)
 {
        struct lwp *l, *l_next;
@@ -120,7 +120,6 @@
                cv_broadcast(&sq_cv);
 
        mutex_spin_exit(mp);
-       return NULL;
 }
 
 void
diff -r d411c0e1bdb9 -r 5affeb050856 sys/sys/sleepq.h
--- a/sys/sys/sleepq.h  Thu Apr 24 11:58:04 2014 +0000
+++ b/sys/sys/sleepq.h  Thu Apr 24 12:04:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sleepq.h,v 1.22 2012/02/19 21:07:00 rmind Exp $        */
+/*     $NetBSD: sleepq.h,v 1.23 2014/04/24 12:04:28 pooka Exp $        */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 void   sleepq_enqueue(sleepq_t *, wchan_t, const char *, syncobj_t *);
 void   sleepq_unsleep(lwp_t *, bool);
 void   sleepq_timeout(void *);
-lwp_t  *sleepq_wake(sleepq_t *, wchan_t, u_int, kmutex_t *);
+void   sleepq_wake(sleepq_t *, wchan_t, u_int, kmutex_t *);
 int    sleepq_abort(kmutex_t *, int);
 void   sleepq_changepri(lwp_t *, pri_t);
 void   sleepq_lendpri(lwp_t *, pri_t);



Home | Main Index | Thread Index | Old Index