[lkml]   [2001]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: can somebody explain barrier() macro ?
On Tue, Feb 20, 2001 at 12:50:54PM -0700, wrote:
> barrier() is defined in kernel.h as follows :
> #define barrier() __asm__ __volatile__("": : :"memory")
> what does this mean ? is this like "nop" ?

It's a write barrier. It prevents the compiler from optimising writes
to memory: all outstanding writes should be done before the program
flow crosses the barrier().


J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:17    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean