lkml.org 
[lkml]   [1996]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Is clobber "memory" in include/asm-i386/system.h necessary?
Date
> 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).

volatile isnt enough for portable SMP code. While the intel boards
have coherent memory caches and strong store ordering the sparcs dont all
posess this nor do many other processors. Thus a write to a volatile variable
might not be seen on the other processor at once.

Alan



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.060 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site