Ignore:
Timestamp:
Jun 20, 2022, 4:13:34 PM (2 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
1dbbef6, 5a96b36
Parents:
df932552
Message:

added atomics to spin_queue_lock

File:
1 edited

Legend:

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

    rdf932552 r2ed32fa7  
    480480        while(__atomic_load_n(&held, __ATOMIC_SEQ_CST)) Pause();
    481481        __atomic_store_n(&held, true, __ATOMIC_SEQ_CST);
    482         // printf("locked\n");
    483482        unlock( lock, node );
    484483        #ifdef __CFA_DEBUG__
     
    488487
    489488static inline void unlock(spin_queue_lock & this) with(this) {
    490         // printf("unlocked\n");
    491489        #ifdef __CFA_DEBUG__
    492490        owner = 0p;
    493491        #endif
    494         __atomic_store_n(&held, false, __ATOMIC_SEQ_CST);
     492        __atomic_store_n(&held, false, __ATOMIC_RELEASE);
    495493}
    496494
Note: See TracChangeset for help on using the changeset viewer.