diff options
author | Keir Fraser <keir@xen.org> | 2011-06-23 11:27:38 +0100 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-06-23 11:27:38 +0100 |
commit | eebfd58f212c5fb75e602ac1aa126863452375da (patch) | |
tree | 8f4b07feacf34e316e1cc9a5ff90d3b3ea7eb61a /xen/common/preempt.c | |
parent | 66b29760bc32964308a5dcd5d8b0d75930d0bff8 (diff) | |
download | xen-eebfd58f212c5fb75e602ac1aa126863452375da.tar.gz xen-eebfd58f212c5fb75e602ac1aa126863452375da.tar.bz2 xen-eebfd58f212c5fb75e602ac1aa126863452375da.zip |
Simplify preempt.h dependencies by moving in_atomic() to preempt.c
..clean up the ensuing fallout.
Signed-off-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/preempt.c')
-rw-r--r-- | xen/common/preempt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/common/preempt.c b/xen/common/preempt.c index e2133ea50a..a02eb6d28d 100644 --- a/xen/common/preempt.c +++ b/xen/common/preempt.c @@ -21,5 +21,12 @@ */ #include <xen/preempt.h> +#include <xen/irq.h> +#include <asm/system.h> DEFINE_PER_CPU(unsigned int, __preempt_count); + +bool_t in_atomic(void) +{ + return preempt_count() || in_irq() || !local_irq_is_enabled(); +} |