Subversion Repositories HelenOS

Rev

Rev 2082 | Rev 3134 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2082 Rev 3133
Line 43... Line 43...
43
 
43
 
44
#define memory_barrier()    asm volatile ("mf\n" ::: "memory")
44
#define memory_barrier()    asm volatile ("mf\n" ::: "memory")
45
#define read_barrier()      memory_barrier()
45
#define read_barrier()      memory_barrier()
46
#define write_barrier()     memory_barrier()
46
#define write_barrier()     memory_barrier()
47
 
47
 
-
 
48
#define srlz_i()        \
48
#define srlz_i()        asm volatile (";; srlz.i ;;\n" ::: "memory")
49
    asm volatile (";; srlz.i ;;\n" ::: "memory")
-
 
50
#define srlz_d()        \
49
#define srlz_d()        asm volatile (";; srlz.d\n" ::: "memory")
51
    asm volatile (";; srlz.d\n" ::: "memory")
-
 
52
 
-
 
53
#define fc_i(a)         \
-
 
54
    asm volatile ("fc.i %0\n" : "r" ((a)) :: "memory")  
-
 
55
#define sync_i()        \
-
 
56
    asm volatile (";; sync.i\n" ::: "memory")
-
 
57
 
-
 
58
#define smc_coherence(a)    \
-
 
59
{               \
-
 
60
    fc_i((a));      \
-
 
61
    sync_i();       \
-
 
62
    srlz_i();       \
-
 
63
}
50
 
64
 
51
#endif
65
#endif
52
 
66
 
53
/** @}
67
/** @}
54
 */
68
 */