Changeset 06bdba4 for libcfa


Ignore:
Timestamp:
Jun 30, 2022, 11:33:20 AM (22 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
25404c7
Parents:
fc2c57a9 (diff), adf03a6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    rfc2c57a9 r06bdba4  
    533533        #endif
    534534        lock( lock, node );
    535         while(held) Pause();
    536         held = true;
     535        while(__atomic_load_n(&held, __ATOMIC_SEQ_CST)) Pause();
     536        __atomic_store_n(&held, true, __ATOMIC_SEQ_CST);
    537537        unlock( lock, node );
    538538        #ifdef __CFA_DEBUG__
     
    545545        owner = 0p;
    546546        #endif
    547         held = false;
     547        __atomic_store_n(&held, false, __ATOMIC_SEQ_CST);
    548548}
    549549
     
    586586        #endif
    587587        lock( lock );
    588         while(held) Pause();
    589         held = true;
     588        while(__atomic_load_n(&held, __ATOMIC_SEQ_CST)) Pause();
     589        __atomic_store_n(&held, true, __ATOMIC_RELEASE);
    590590        unlock( lock );
    591591        #ifdef __CFA_DEBUG__
     
    598598        owner = 0p;
    599599        #endif
    600         held = false;
     600        __atomic_store_n(&held, false, __ATOMIC_RELEASE);
    601601}
    602602
Note: See TracChangeset for help on using the changeset viewer.