Messages in this thread | | | Date | Wed, 13 Feb 2019 05:05:40 +0100 | From | Frederic Weisbecker <> | Subject | Re: preempt.h: some SOFTIRQ_OFFSET should be SOFTIRQ_MASK? |
| |
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?
| |