Ignore:
Timestamp:
Jul 20, 2023, 2:09:15 PM (16 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
0e8f4c6
Parents:
a09552d
Message:

did some cleanup in locks.hfa and fixed seg fault bug in channel waituntil remove()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/locks.hfa

    ra09552d r7a2c6b18  
    140140};
    141141
    142 static inline void ?{}(mcs_node & this) { this.next = 0p; }
     142static inline void ?{}( mcs_node & this ) { this.next = 0p; }
    143143
    144144static inline mcs_node * volatile & ?`next ( mcs_node * node ) {
     
    150150};
    151151
    152 static inline void lock(mcs_lock & l, mcs_node & n) {
     152static inline void lock( mcs_lock & l, mcs_node & n ) {
    153153        if(push(l.queue, &n))
    154154                wait(n.sem);
     
    174174};
    175175
    176 static inline void ?{}(mcs_spin_node & this) { this.next = 0p; this.locked = true; }
     176static inline void ?{}( mcs_spin_node & this ) { this.next = 0p; this.locked = true; }
    177177
    178178struct mcs_spin_lock {
     
    180180};
    181181
    182 static inline void lock(mcs_spin_lock & l, mcs_spin_node & n) {
     182static inline void lock( mcs_spin_lock & l, mcs_spin_node & n ) {
    183183    n.locked = true;
    184184        mcs_spin_node * prev = __atomic_exchange_n(&l.queue.tail, &n, __ATOMIC_SEQ_CST);
     
    273273};
    274274static 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;
     275static inline void ?{}( go_mutex & this, go_mutex this2 ) = void;
     276static inline void ?=?( go_mutex & this, go_mutex this2 ) = void;
    277277
    278278static 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.