lkml.org 
[lkml]   [1999]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tutorial question: where mb() is needed?
On Sat, Jan 09, 1999 at 06:25:32AM +0000, Linus Torvalds wrote:
> No. The spinlocks themselves contain the required SMP memory
> synchronization points internally: otherwise they wouldn't be very
> useful as locking primitives. For example, on intel any locked memory
> reference (and the spinlocks do them) will act as a memory barrier, and
> that's why you don't see any extra code in asm-i386/spinlocks.h - on
> other architectures the spinlocks do other things to get the same goal.

Linus,

While the asm does force a processor-level barrier, the asm constraints
don't force GCC to keep memory references in the right order around the
barrier. I'm not sure if such a constraint is generally required. Can
you comment on this?

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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