linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* use of preempt_count instead of in_atomic() at leds-gpio.c
@ 2008-03-16 18:43 Henrique de Moraes Holschuh
  2008-03-16 19:46 ` David Brownell
  0 siblings, 1 reply; 45+ messages in thread
From: Henrique de Moraes Holschuh @ 2008-03-16 18:43 UTC (permalink / raw)
  To: David Brownell, Richard Purdie; +Cc: linux-kernel, David Brownell

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

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2008-03-27 19:04 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-16 18:43 use of preempt_count instead of in_atomic() at leds-gpio.c Henrique de Moraes Holschuh
2008-03-16 19:46 ` David Brownell
2008-03-18  7:14   ` Andrew Morton
2008-03-18 19:06     ` David Brownell
2008-03-18 20:07       ` Andrew Morton
2008-03-20 22:56     ` Henrique de Moraes Holschuh
2008-03-20 23:47       ` Andrew Morton
2008-03-21  0:36         ` Henrique de Moraes Holschuh
2008-03-21  1:08           ` Andrew Morton
2008-03-21  1:31             ` Alan Stern
2008-03-21  1:36               ` Michael Buesch
2008-03-21  2:27                 ` Andrew Morton
2008-03-21  3:07                   ` Alan Stern
2008-03-21  3:17                     ` Andrew Morton
2008-03-21  9:53                       ` Jean Delvare
2008-03-21 17:37                         ` Andrew Morton
2008-03-21 18:05                           ` Alan Stern
2008-03-24 19:34                             ` Jonathan Corbet
2008-03-24 19:42                               ` Andrew Morton
2008-03-24 19:53                                 ` Jonathan Corbet
2008-03-25  8:52                                   ` Junio C Hamano
2008-03-25 10:39                                     ` Jean Delvare
2008-03-25 13:44                                     ` Jonathan Corbet
2008-03-25 23:20                                       ` David Brownell
2008-03-26 14:28                                         ` Alan Stern
2008-03-26 16:17                                           ` Henrique de Moraes Holschuh
2008-03-26 16:46                                             ` Richard Purdie
2008-03-27 18:51                                             ` David Brownell
2008-03-21 15:11                       ` Tetsuo Handa
2008-03-21 16:54                         ` Stefan Richter
2008-03-21 17:02                           ` Stefan Richter
2008-03-23  5:53                             ` Tetsuo Handa
2008-03-21 13:47                   ` Heiko Carstens
2008-03-21 16:54                     ` Greg KH
2008-03-21 19:59                       ` Andrew Morton
2008-03-21 20:16                         ` Michael Buesch
2008-03-21 20:20                           ` Michael Buesch
2008-03-21  9:21             ` Stefan Richter
2008-03-21  9:27               ` Stefan Richter
2008-03-21 12:37               ` Henrique de Moraes Holschuh
2008-03-21 13:16                 ` Stefan Richter
2008-03-22 11:29                   ` Stefan Richter
2008-03-21 17:04             ` David Brownell
2008-03-21  0:56         ` Richard Purdie
2008-03-21  2:10           ` Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).