X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Fhardirq.h;h=897f723bd222f73a9c9e72519fe4b8cd14e40f14;hb=d619ee08490ca78c9571dca133cd0d0527a60839;hp=49829988bfa02cb85a02e38db87f81d077261060;hpb=076d84bbdb396360d16aaa108c55aa1e24ad47a3;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 49829988bfa..897f723bd22 100644 --- a/include/linux/hardirq.h +++ b/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