mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* CONFIG_PREEMPT_COUNT
@ 2014-03-31 10:38 Skidanov, Alexey
  2014-03-31 12:24 ` CONFIG_PREEMPT_COUNT Paul Bolle
  0 siblings, 1 reply; 3+ messages in thread
From: Skidanov, Alexey @ 2014-03-31 10:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Gabbay, Oded

Hello,

I found that preempt_enable() and preempt_disable() macros are defined differently depending on CONFIG_PREEMPT_COUNT:
- They increment per CPU preemption counter, if CONFIG_PREEMPT_COUNT defined
- They do nothing (just call barrier), if not.
I have it undefined in my source tree.

The questions are:
1. What is the purpose of CONFIG_PREEMPT_COUNT define and how I can define it?
2. In the previous kernel versions, spin_lock() and spin_unlock() call preempt_enable() and preempt_disable() respectively, ensuring that the current task will not be preempted by any other task while lock is held. Is this still ensured with these macros defined as "do nothing" ?

Thanks
Alexey


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-31 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31 10:38 CONFIG_PREEMPT_COUNT Skidanov, Alexey
2014-03-31 12:24 ` CONFIG_PREEMPT_COUNT Paul Bolle
2014-03-31 12:50   ` CONFIG_PREEMPT_COUNT Skidanov, Alexey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome