Skip to content

Commit

Permalink
sched/preempt: Remove PREEMPT_ACTIVE unmasking off in_atomic()
Browse files Browse the repository at this point in the history
Now that PREEMPT_ACTIVE implies PREEMPT_DISABLE_OFFSET, ignoring
PREEMPT_ACTIVE from in_atomic() check isn't useful anymore.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1431441711-29753-7-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed May 19, 2015
1 parent e017cf2 commit 3e51f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/preempt.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
* 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)
#define in_atomic() (preempt_count() != 0)

/*
* Check whether we were atomic before we did preempt_disable():
Expand Down

0 comments on commit 3e51f3c

Please sign in to comment.