From eeeb0d3f0b389f65414359f14d51a52e308654cd Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Fri, 28 Mar 2008 14:15:49 -0700 Subject: [PATCH] --- yaml --- r: 87892 b: refs/heads/master c: 8c703d35fa91911dd92a18c31a718853f483ad80 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/hardirq.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 09c4477884da..3320a3729ce1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f67e74ca690d9f168cc468b7d714caad492740a6 +refs/heads/master: 8c703d35fa91911dd92a18c31a718853f483ad80 diff --git a/trunk/include/linux/hardirq.h b/trunk/include/linux/hardirq.h index 49829988bfa0..897f723bd222 100644 --- a/trunk/include/linux/hardirq.h +++ b/trunk/include/linux/hardirq.h @@ -72,6 +72,13 @@ #define in_softirq() (softirq_count()) #define in_interrupt() (irq_count()) +/* + * Are we running in atomic context? WARNING: this macro cannot + * always detect atomic context; in particular, it cannot know about + * held spinlocks in non-preemptible kernels. Thus it should not be + * used in the general case to determine whether sleeping is possible. + * Do not use in_atomic() in driver code. + */ #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) #ifdef CONFIG_PREEMPT