Re: Is clobber "memory" in include/asm-i386/system.h necessary?

Warner Losh (imp@village.org)
Sat, 04 May 1996 17:57:10 -0600


: "volatile" itself causes suboptimal code to be generated
: even in places where it's unnecessary, such as between cli() and sti().

What about MP machines? Wouldn't volatile still be needed between a
cli() and sti() because other processors might change the value out
from under you? Granted, a higher level of locking would prevent
that, but there are cases where you might want that to happen (like in
the lock manager code, assuming it uses atomic memory access
instructions).

Warner