lkml.org 
[lkml]   [2001]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: can somebody explain barrier() macro ?
Date
From
> barrier() is defined in kernel.h as follows :
>
> #define barrier() __asm__ __volatile__("": : :"memory")
>
> what does this mean ? is this like "nop" ?

Its adds an empty piece of assembler (ie no code) and declares that this
non code causes effects on memory. That forces gcc to writeback before the
barrier and reload cached values afterwards
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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