aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/preempt.h
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2013-01-14 16:47:22 +0000
committerKeir Fraser <keir@xen.org>2013-01-14 16:47:22 +0000
commit836f8188f26db0148e6844d11c15edb66bec7b8f (patch)
treef584a68544af1198d58a7320fdcf75a38c598ea9 /xen/include/xen/preempt.h
parentbc9ae8b5d1e96ccdcf8d9bc9ed7907e7fafc9fe3 (diff)
downloadxen-836f8188f26db0148e6844d11c15edb66bec7b8f.tar.gz
xen-836f8188f26db0148e6844d11c15edb66bec7b8f.tar.bz2
xen-836f8188f26db0148e6844d11c15edb66bec7b8f.zip
xen: Introduce ASSERT_NOT_IN_ATOMIC() to give more info on in_atomic() crash.
Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/preempt.h')
-rw-r--r--xen/include/xen/preempt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/include/xen/preempt.h b/xen/include/xen/preempt.h
index fd02ada12b..bef83135a1 100644
--- a/xen/include/xen/preempt.h
+++ b/xen/include/xen/preempt.h
@@ -28,4 +28,10 @@ DECLARE_PER_CPU(unsigned int, __preempt_count);
bool_t in_atomic(void);
+#ifndef NDEBUG
+void ASSERT_NOT_IN_ATOMIC(void);
+#else
+#define ASSERT_NOT_IN_ATOMIC() ((void)0)
+#endif
+
#endif /* __XEN_PREEMPT_H__ */