Changeset 3f0b062


Ignore:
Timestamp:
Oct 23, 2023, 8:55:09 AM (8 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
8df19af
Parents:
ca995e3
Message:

ifdef'd the arm fences that were added to channels so that they only appear on the arm

File:
1 edited

Legend:

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

    rca995e3 r3f0b062  
    2828    unlock( lock );
    2929    park();
     30    #if defined(__ARM_ARCH)
    3031    __atomic_thread_fence( __ATOMIC_SEQ_CST );
     32    #endif
    3133    return sn.extra == 0p;
    3234}
     
    131133static inline void __cons_handoff( channel(T) & chan, T & elem ) with(chan) {
    132134    memcpy( cons`first.extra, (void *)&elem, sizeof(T) ); // do waiting consumer work
     135    #if defined(__ARM_ARCH)
    133136    __atomic_thread_fence( __ATOMIC_SEQ_CST );
     137    #endif
    134138    wake_one( cons );
    135139}
     
    138142static inline void __prods_handoff( channel(T) & chan, T & retval ) with(chan) {
    139143    memcpy( (void *)&retval, prods`first.extra, sizeof(T) );
     144    #if defined(__ARM_ARCH)
    140145    __atomic_thread_fence( __ATOMIC_SEQ_CST );
     146    #endif
    141147    wake_one( prods );
    142148}
Note: See TracChangeset for help on using the changeset viewer.