lkml.org 
[lkml]   [1999]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] smp-2.3.30-A1, mb(), wmb(), rmb()
Linus Torvalds wrote:
> #define mb() do { \
> int __dummy; \
> asm volatile("movl %%eax,%0":"=m" (&dummy): :"memory"); \
> } while (0)

Possible tweak: Use %ebp instead of %eax because %ebp isn't written as
often therefore the mb() instruction can sometimes retire sooner...

-- 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:55    [W:0.021 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site