Changeset 7a2c6b18 for libcfa/src/concurrency/locks.hfa
- Timestamp:
- Jul 20, 2023, 2:09:15 PM (16 months ago)
- Branches:
- master
- Children:
- 0e8f4c6
- Parents:
- a09552d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/locks.hfa
ra09552d r7a2c6b18 140 140 }; 141 141 142 static inline void ?{}( mcs_node & this) { this.next = 0p; }142 static inline void ?{}( mcs_node & this ) { this.next = 0p; } 143 143 144 144 static inline mcs_node * volatile & ?`next ( mcs_node * node ) { … … 150 150 }; 151 151 152 static inline void lock( mcs_lock & l, mcs_node & n) {152 static inline void lock( mcs_lock & l, mcs_node & n ) { 153 153 if(push(l.queue, &n)) 154 154 wait(n.sem); … … 174 174 }; 175 175 176 static inline void ?{}( mcs_spin_node & this) { this.next = 0p; this.locked = true; }176 static inline void ?{}( mcs_spin_node & this ) { this.next = 0p; this.locked = true; } 177 177 178 178 struct mcs_spin_lock { … … 180 180 }; 181 181 182 static inline void lock( mcs_spin_lock & l, mcs_spin_node & n) {182 static inline void lock( mcs_spin_lock & l, mcs_spin_node & n ) { 183 183 n.locked = true; 184 184 mcs_spin_node * prev = __atomic_exchange_n(&l.queue.tail, &n, __ATOMIC_SEQ_CST); … … 273 273 }; 274 274 static inline void ?{}( go_mutex & this ) with(this) { val = 0; } 275 // static inline void ?{}( go_mutex & this, go_mutex this2 ) = void; // these don't compile correctly at the moment so they should be omitted 276 //static inline void ?=?( go_mutex & this, go_mutex this2 ) = void;275 static inline void ?{}( go_mutex & this, go_mutex this2 ) = void; 276 static inline void ?=?( go_mutex & this, go_mutex this2 ) = void; 277 277 278 278 static inline bool internal_try_lock(go_mutex & this, int & compare_val, int new_val ) with(this) {
Note: See TracChangeset
for help on using the changeset viewer.