- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel/private.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/private.hfa
r2284d20 rcd3fc46 88 88 #elif defined(CFA_HAVE_LINUX_RSEQ_H) 89 89 extern "Cforall" { 90 extern __attribute__((aligned(64))) __threadvolatile struct rseq __cfaabi_rseq;90 extern __attribute__((aligned(64))) thread_local volatile struct rseq __cfaabi_rseq; 91 91 } 92 92 #else … … 161 161 // Blocking acquire 162 162 static inline void __atomic_acquire(volatile bool * ll) { 163 /* paranoid */ verify( ! __preemption_enabled() );164 /* paranoid */ verify(ll);165 166 163 while( __builtin_expect(__atomic_exchange_n(ll, (bool)true, __ATOMIC_SEQ_CST), false) ) { 167 164 while(__atomic_load_n(ll, (int)__ATOMIC_RELAXED)) … … 169 166 } 170 167 /* paranoid */ verify(*ll); 171 /* paranoid */ verify( ! __preemption_enabled() );172 168 } 173 169 174 170 // Non-Blocking acquire 175 171 static inline bool __atomic_try_acquire(volatile bool * ll) { 176 /* paranoid */ verify( ! __preemption_enabled() );177 /* paranoid */ verify(ll);178 179 172 return !__atomic_exchange_n(ll, (bool)true, __ATOMIC_SEQ_CST); 180 173 } … … 182 175 // Release 183 176 static inline void __atomic_unlock(volatile bool * ll) { 184 /* paranoid */ verify( ! __preemption_enabled() );185 /* paranoid */ verify(ll);186 177 /* paranoid */ verify(*ll); 187 178 __atomic_store_n(ll, (bool)false, __ATOMIC_RELEASE);
Note:
See TracChangeset
for help on using the changeset viewer.