diff options
| author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-19 12:17:29 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:17:29 -0400 |
| commit | adf6d34e460387ee3e8f1e1875d52bff51212c7d (patch) | |
| tree | 88ef100143e6184103a608f82dfd232bf6376eaf /include/linux/hardirq.h | |
| parent | d1964dab60ce7c104dd21590e987a8787db18051 (diff) | |
| parent | 3760d31f11bfbd0ead9eaeb8573e0602437a9d7c (diff) | |
Merge branch 'omap2-upstream' into devel
Diffstat (limited to 'include/linux/hardirq.h')
| -rw-r--r-- | include/linux/hardirq.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 49829988bfa0..897f723bd222 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -72,6 +72,13 @@ | |||
| 72 | #define in_softirq() (softirq_count()) | 72 | #define in_softirq() (softirq_count()) |
| 73 | #define in_interrupt() (irq_count()) | 73 | #define in_interrupt() (irq_count()) |
| 74 | 74 | ||
| 75 | /* | ||
| 76 | * Are we running in atomic context? WARNING: this macro cannot | ||
| 77 | * always detect atomic context; in particular, it cannot know about | ||
| 78 | * held spinlocks in non-preemptible kernels. Thus it should not be | ||
| 79 | * used in the general case to determine whether sleeping is possible. | ||
| 80 | * Do not use in_atomic() in driver code. | ||
| 81 | */ | ||
| 75 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) | 82 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) |
| 76 | 83 | ||
| 77 | #ifdef CONFIG_PREEMPT | 84 | #ifdef CONFIG_PREEMPT |
