Source-Changes-HG archive

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

[src/trunk]: src/sys/kern KASSERT() that kthread_join()'s target is expecting...



details:   https://anonhg.NetBSD.org/src/rev/a47ce006d823
branches:  trunk
changeset: 828915:a47ce006d823
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Jan 09 22:58:45 2018 +0000

description:
KASSERT() that kthread_join()'s target is expecting to be joined.

As discussed on IRC.

diffstat:

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

diffs (26 lines):

diff -r 3e7a6f2843e7 -r a47ce006d823 sys/kern/kern_kthread.c
--- a/sys/kern/kern_kthread.c   Tue Jan 09 21:17:45 2018 +0000
+++ b/sys/kern/kern_kthread.c   Tue Jan 09 22:58:45 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_kthread.c,v 1.42 2017/04/21 15:10:34 christos Exp $       */
+/*     $NetBSD: kern_kthread.c,v 1.43 2018/01/09 22:58:45 pgoyette Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.42 2017/04/21 15:10:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.43 2018/01/09 22:58:45 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -194,6 +194,7 @@
 {
 
        KASSERT((l->l_flag & LW_SYSTEM) != 0);
+       KASSERT((l->l_pflag & LP_MUSTJOIN) != 0);
 
        /*
         * - Wait if some other thread has occupied the target.



Home | Main Index | Thread Index | Old Index