Messages in this thread | | | Date | Sun, 12 Sep 2004 15:57:20 -0700 | From | "David S. Miller" <> | Subject | Re: [PATCH] irq_enter/irq_exit consolidation |
| |
On Sun, 12 Sep 2004 12:44:48 +0100 Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> This guarantee must also exist on every other architecture, otherwise: > > > ===== include/linux/hardirq.h 1.1 vs edited ===== > > --- 1.1/include/linux/hardirq.h 2004-09-08 08:32:57 +02:00 > > +++ edited/include/linux/hardirq.h 2004-09-11 21:26:28 +02:00 > > +#define irq_exit() \ > > +do { \ > > + preempt_count() -= IRQ_EXIT_OFFSET; \ > > would be buggy - it's an inherently non-atomic operation.
It works out actually, if we take an interrupt in the middle of the operation, that's fine because the preemption count will be precisely the same as we first read it by the time we return from that interrupt, work out some example cases as I think that makes it easier to understand. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |