Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/linux Add KASSERT about state after ...



details:   https://anonhg.NetBSD.org/src/rev/5f3810615ea4
branches:  trunk
changeset: 366343:5f3810615ea4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:58:24 2018 +0000

description:
Add KASSERT about state after callout fires.

diffstat:

 sys/external/bsd/common/linux/linux_work.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 40f7e8453c54 -r 5f3810615ea4 sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 14:58:09 2018 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 14:58:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_work.c,v 1.14 2018/08/27 14:58:09 riastradh Exp $        */
+/*     $NetBSD: linux_work.c,v 1.15 2018/08/27 14:58:24 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.14 2018/08/27 14:58:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.15 2018/08/27 14:58:24 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -282,6 +282,8 @@
        default:
                panic("delayed work callout in bad state: %p", dw);
        }
+       KASSERT(dw->dw_state == DELAYED_WORK_IDLE ||
+           dw->dw_state == DELAYED_WORK_SCHEDULED);
        mutex_exit(&wq->wq_lock);
 }
 



Home | Main Index | Thread Index | Old Index