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

From: David Brownell
Date: Sun Mar 16 2008 - 15:46:36 EST


On Sunday 16 March 2008, Henrique de Moraes Holschuh wrote:
> 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?

At this point, I don't know of any such reason.

I remember hunting for the right heuristic, and settling on
that one for reasons that I can't recall now. They may even
be no longer applicable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/