Subversion Repositories HelenOS

Rev

Rev 177 | Rev 457 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 423
Line 41... Line 41...
41
 */
41
 */
42
 
42
 
43
#define CS_ENTER_BARRIER()  __asm__ volatile ("" ::: "memory")
43
#define CS_ENTER_BARRIER()  __asm__ volatile ("" ::: "memory")
44
#define CS_LEAVE_BARRIER()  __asm__ volatile ("" ::: "memory")
44
#define CS_LEAVE_BARRIER()  __asm__ volatile ("" ::: "memory")
45
 
45
 
-
 
46
#ifdef __STRONG_ORDERING__
-
 
47
 
-
 
48
#define memory_barrier()
-
 
49
#define read_barrier()
-
 
50
#define write_barrier()
-
 
51
 
-
 
52
#else
-
 
53
 
46
#define memory_barrier()    __asm__ volatile ("mfence\n" ::: "memory")
54
#define memory_barrier()    __asm__ volatile ("mfence\n" ::: "memory")
47
#define read_barrier()      __asm__ volatile ("sfence\n" ::: "memory")
55
#define read_barrier()      __asm__ volatile ("sfence\n" ::: "memory")
48
#define write_barrier()     __asm__ volatile ("lfence\n" ::: "memory")
56
#define write_barrier()     __asm__ volatile ("lfence\n" ::: "memory")
49
 
57
 
50
#endif
58
#endif
-
 
59
 
-
 
60
#endif