lkml.org 
[lkml]   [2008]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateSun, 16 Mar 2008 15:43:49 -0300
FromHenrique de Moraes Holschuh <>
Subjectuse of preempt_count instead of in_atomic() at leds-gpio.c
David, Richard,

Is the use of "if (preempt_count())" to know when to defer led gpio work to
a workqueue needed? Shouldn't "if (in_atomic())" be enough?
I have found no other such uses of preempt_count() anywhere in kernel code,
while in_atomic() is used for that sort of heuristic in various places.

Relevant git commit id is: 00852279af5ad26956bc7f4d0e86fdb40192e542
"leds: Teach leds-gpio to handle timer-unsafe GPIOs". It made mainline in
2.6.23-rc1.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


\
 
 \ /
  Last update: 2008-03-16 19:47    [from the cache]
©2003-2010