Re: use of preempt_count instead of in_atomic() at leds-gpio.c

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jonathan Corbet <corbet@...>
Cc: Andrew Morton <akpm@...>, <stern@...>, <khali@...>, <mb@...>, <hmh@...>, <david-b@...>, <rpurdie@...>, <linux-kernel@...>, <mingo@...>, <geert@...>
Date: Tuesday, March 25, 2008 - 4:52 am

corbet@lwn.net (Jonathan Corbet) writes:


Is it just me who feels this comment that says "in_atomic() is not a way
to tell if we are in atomic reliably and cannot be used for such and such"
very reader-unfriendly?  Ok, maybe the macro is not reliable and is not
meant to be used for the purpose its name seems to suggest (at least to a
non-kernel person).  An inevitable question is, then what is it good for?
What's the right situation to use this macro?

I guess an additional comment "even if this says no, you could still be in
atomic, but if this says yes, then you definitely are in atomic and cannot
sleep" may help unconfuse a clueless reader like myself.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
use of preempt_count instead of in_atomic() at leds-gpio.c, Henrique de Moraes Holschuh..., (Sun Mar 16, 2:43 pm)
Re: use of preempt_count instead of in_atomic() at leds-gpio.c, Henrique de Moraes Holschuh..., (Thu Mar 20, 6:56 pm)
Re: use of preempt_count instead of in_atomic() at leds-gpio.c, Henrique de Moraes Holschuh..., (Thu Mar 20, 10:10 pm)
Re: use of preempt_count instead of in_atomic() at leds-gpio.c, Henrique de Moraes Holschuh..., (Thu Mar 20, 8:36 pm)
Re: use of preempt_count instead of in_atomic() at leds-gpio.c, Henrique de Moraes Holschuh..., (Fri Mar 21, 8:37 am)
Re: use of preempt_count instead of in_atomic() at leds-gpio.c, Junio C Hamano, (Tue Mar 25, 4:52 am)
Re: use of preempt_count instead of in_atomic() at leds-gpio.c, Henrique de Moraes Holschuh..., (Wed Mar 26, 12:17 pm)