Messages in this thread | | | From | "Skidanov, Alexey" <> | Subject | CONFIG_PREEMPT_COUNT | Date | Mon, 31 Mar 2014 10:38:12 +0000 |
| |
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
| |