diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-09-28 19:11:45 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-06 18:08:17 +0300 |
commit | da7142e2ed735e1c1bef5a757dc55de35c65fbd6 (patch) | |
tree | 96aeb81dff99652bb43623fca210ef08ddc57c32 /include/linux | |
parent | 1dc0fffc48af94513e621f95dff730ed4f7317ec (diff) | |
download | linux-da7142e2ed735e1c1bef5a757dc55de35c65fbd6.tar.xz |
sched/core: Simplify preempt_count tests
Since we stopped setting PREEMPT_ACTIVE, there is no need to mask it
out of preempt_count() tests.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/preempt.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 448dfd0b2ea6..b2676a16cfbe 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -126,8 +126,7 @@ * Check whether we were atomic before we did preempt_disable(): * (used by the scheduler) */ -#define in_atomic_preempt_off() \ - ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_DISABLE_OFFSET) +#define in_atomic_preempt_off() (preempt_count() != PREEMPT_DISABLE_OFFSET) #if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER) extern void preempt_count_add(int val); |