Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Spinkle ASSERT_SLEEPABLE to xcall functions



details:   https://anonhg.NetBSD.org/src/rev/fe7fccb9e7ee
branches:  trunk
changeset: 829624:fe7fccb9e7ee
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Wed Feb 07 04:25:09 2018 +0000

description:
Spinkle ASSERT_SLEEPABLE to xcall functions

diffstat:

 sys/kern/subr_xcall.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 59c9954d7a1e -r fe7fccb9e7ee sys/kern/subr_xcall.c
--- a/sys/kern/subr_xcall.c     Wed Feb 07 04:13:47 2018 +0000
+++ b/sys/kern/subr_xcall.c     Wed Feb 07 04:25:09 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_xcall.c,v 1.25 2018/02/05 02:51:41 ozaki-r Exp $  */
+/*     $NetBSD: subr_xcall.c,v 1.26 2018/02/07 04:25:09 ozaki-r Exp $  */
 
 /*-
  * Copyright (c) 2007-2010 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.25 2018/02/05 02:51:41 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.26 2018/02/07 04:25:09 ozaki-r Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -257,6 +257,7 @@
 {
 
        KASSERT(!cpu_intr_p() && !cpu_softintr_p());
+       ASSERT_SLEEPABLE();
 
        if ((flags & XC_HIGHPRI) != 0) {
                int ipl = xc_extract_ipl(flags);
@@ -278,6 +279,7 @@
 
        KASSERT(ci != NULL);
        KASSERT(!cpu_intr_p() && !cpu_softintr_p());
+       ASSERT_SLEEPABLE();
 
        if ((flags & XC_HIGHPRI) != 0) {
                int ipl = xc_extract_ipl(flags);
@@ -298,6 +300,7 @@
        xc_state_t *xc;
 
        KASSERT(!cpu_intr_p() && !cpu_softintr_p());
+       ASSERT_SLEEPABLE();
 
        /* Determine whether it is high or low priority cross-call. */
        if ((where & XC_PRI_BIT) != 0) {



Home | Main Index | Thread Index | Old Index