PERFORCE change 133596 for review
Kip Macy
kmacy at FreeBSD.org
Fri Jan 18 13:30:23 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=133596
Change 133596 by kmacy at pandemonium:kmacy:xen31 on 2008/01/18 21:30:00
don't acquire the console lock if we're in the middle of a panic
Affected files ...
.. //depot/projects/xen31/sys/dev/xen/console/console.c#9 edit
Differences ...
==== //depot/projects/xen31/sys/dev/xen/console/console.c#9 (text+ko) ====
@@ -79,8 +79,16 @@
#define CN_LOCK_INIT(x, _name) \
mtx_init(&x, _name, NULL, MTX_SPIN|MTX_RECURSE)
-#define CN_LOCK(l) mtx_lock_spin(&(l))
-#define CN_UNLOCK(l) mtx_unlock_spin(&(l))
+#define CN_LOCK(l) \
+ do { \
+ if (panicstr == NULL) \
+ mtx_lock_spin(&(l)); \
+ } while (0)
+#define CN_UNLOCK(l) \
+ do { \
+ if (panicstr == NULL) \
+ mtx_unlock_spin(&(l)); \
+ } while (0)
#define CN_LOCK_ASSERT(x) mtx_assert(&x, MA_OWNED)
#define CN_LOCK_DESTROY(x) mtx_destroy(&x)
More information about the p4-projects
mailing list