Changeset 1ecdbb0 in mainline for kernel/arch/sparc64/include/barrier.h
- Timestamp:
- 2006-12-14T21:19:37Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 771cd22
- Parents:
- 9a8baed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/barrier.h
r9a8baed r1ecdbb0 37 37 38 38 /* 39 * We assume TSO memory model in which only reads can pass earlier stores 40 * (but not earlier reads). Therefore, CS_ENTER_BARRIER() and CS_LEAVE_BARRIER() 41 * can be empty. 39 * Our critical section barriers are prepared for the weakest RMO memory model. 42 40 */ 43 #define CS_ENTER_BARRIER() __asm__ volatile ("" ::: "memory") 44 #define CS_LEAVE_BARRIER() __asm__ volatile ("" ::: "memory") 41 #define CS_ENTER_BARRIER() \ 42 __asm__ volatile ( \ 43 "membar #LoadLoad | #LoadStore\n" \ 44 ::: "memory" \ 45 ) 46 #define CS_LEAVE_BARRIER() \ 47 __asm__ volatile ( \ 48 "membar #StoreStore\n" \ 49 "membar #LoadStore\n" \ 50 ::: "memory" \ 51 ) 45 52 46 #define memory_barrier() __asm__ volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory") 47 #define read_barrier() __asm__ volatile ("membar #LoadLoad\n" ::: "memory") 48 #define write_barrier() __asm__ volatile ("membar #StoreStore\n" ::: "memory") 53 #define memory_barrier() \ 54 __asm__ volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory") 55 #define read_barrier() \ 56 __asm__ volatile ("membar #LoadLoad\n" ::: "memory") 57 #define write_barrier() \ 58 __asm__ volatile ("membar #StoreStore\n" ::: "memory") 49 59 50 60 /** Flush Instruction Memory instruction. */
Note:
See TracChangeset
for help on using the changeset viewer.