Messages in this thread | | | Date | Mon, 25 Oct 2004 22:00:48 +0100 (BST) | From | "Maciej W. Rozycki" <> | Subject | Re: Race betwen the NMI handler and the RTC clock in practially all kernels II |
| |
On Mon, 25 Oct 2004, Andi Kleen wrote:
> So it's impossible to check the old value. The original code is the only > way to do this (if it's even needed, Intel also doesn't say anything > about this bit being a flip-flop). Only possible change would be to > write an alternative index.
You can't read the old value, but you can have a shadow variable written every time the real index is written. Since NMIs are not preemptible and this is a simple producer-consumer access, no mutex around accesses to the variable is needed.
Maciej - 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/
| |