i know this not the place, but since they so many kernel developers here...<br>
i have a different question regarding locking in the kernel.<br>
<br>
In the last issue of linux magazine there was an article about<br>
locking. it presented the follwing  scenario. <br>
<br>
spin_lock(lock)<br>
...<br>
spin_unlock(lock).<br>
<br>
In uni processot mahcine with preemption enabled.<br>
spin_lock saves flags and cli(). spin_unlock()  push flags out ( for nesting interrupts)<br>
<br>
they said that this code :<br>
Does not protect preemption.<br>
<br>
no protection from preemption ? How ?<br>
How can process B get some cpu while process A had disabled interrupts,<br>

no scheduling (unwillingly ) can be made.Prior to the preemption the<br>

kernel scehdular must run and set Process B as the one to run , and to the<br>

best my knowledge, a schedular runs only in timer interrupt.<br>
<span style="font-weight: bold;">Or is it possible that the schduler timer routine isn't running in interrupt context ?</span><br>
<br>
<br>
thank you<br>-- <br>Raz<br>