Module Name: src
Committed By: tsutsui
Date: Wed Aug 15 19:13:58 UTC 2012
Modified Files:
src/sys/arch/x68k/dev: event_var.h
Log Message:
Make sure to take proc_lock mutex on calling psignal(9) in EV_WAKEUP() macro
as sys/dev/sun/event_var.h does.
Fixes immediate KASSERT(mutex_owned(proc_lock)) panic during running Xserver
on DIAGNOSTIC kernel.
Should be pulled up to netbsd-6.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/dev/event_var.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x68k/dev/event_var.h
diff -u src/sys/arch/x68k/dev/event_var.h:1.8 src/sys/arch/x68k/dev/event_var.h:1.9
--- src/sys/arch/x68k/dev/event_var.h:1.8 Sat Mar 1 14:16:50 2008
+++ src/sys/arch/x68k/dev/event_var.h Wed Aug 15 19:13:58 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: event_var.h,v 1.8 2008/03/01 14:16:50 rmind Exp $ */
+/* $NetBSD: event_var.h,v 1.9 2012/08/15 19:13:58 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -67,8 +67,11 @@ struct evvar {
(ev)->ev_wanted = 0; \
wakeup((void *)(ev)); \
} \
- if ((ev)->ev_async) \
+ if ((ev)->ev_async) { \
+ mutex_enter(proc_lock); \
psignal((ev)->ev_io, SIGIO); \
+ mutex_exit(proc_lock); \
+ } \
}
void ev_init(struct evvar *);