Messages in this thread |  | | | Date | Sun, 16 Mar 2008 15:43:49 -0300 | | From | Henrique de Moraes Holschuh <> | | Subject | use 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
|  |