Hi George wrote:
Thank you for the quick reply. It does clear my doubt. If interrupts
are disabled, I should ensure that I do not wake up any process that
might have a higher priority. Else, I should probably use a
spin_lock_irqsave/restore() which already has the preempt_disable()
set.
Would this be the case when I am doing something as part of the ISR as
well or is that a totally different use case?
Not sure, if it's for ISR, IIRC your code is already under interrupt
disabled situation (for the IRQ you're handling), so I guess disabling
interrupt is not needed.
For other case, maybe it's just a function that is supposed to wrapped
by another function. Think about list_add, IIRC there is __list_add()
variant that does less checking. You pick the latter version if you meet
the assumptions for getting faster perfomance.
regards,
Mulyadi
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ