On Tue, Feb 05, 2019 at 07:34:31PM +0100, Denys Vlasenko wrote:
> SOFTIRQ is a counter.
> Why here:
> 
> #define in_serving_softirq()    (softirq_count() & SOFTIRQ_OFFSET)
> #define in_task()               (!(preempt_count() & \
>                                    (NMI_MASK | HARDIRQ_MASK | 
> SOFTIRQ_OFFSET)))
> 
> we check only lowest bit?

So we have SOFTIRQ_OFFSET that is used when serving softirqs.
And we have SOFTIRQ_DISABLE_OFFSET that is used when we disable
softirqs.

I think the choice is right on both tests above, or am I missing something?

Reply via email to