Changeset 4dd10fb for libcfa


Ignore:
Timestamp:
May 12, 2023, 2:19:16 PM (14 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
386fb57, e2887a9
Parents:
01de470
Message:

added atomic_load to non-MX channel get routines

File:
1 edited

Legend:

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

    r01de470 r4dd10fb  
    7474}
    7575static inline size_t get_count( channel(T) & chan ) with(chan) { return __atomic_load_n( &count, __ATOMIC_SEQ_CST); }
    76 static inline size_t get_size( channel(T) & chan ) with(chan) { return size; }
     76static inline size_t get_size( channel(T) & chan ) with(chan) { return __atomic_load_n( &size, __ATOMIC_SEQ_CST); }
    7777static inline bool has_waiters( channel(T) & chan ) with(chan) { return !cons`isEmpty || !prods`isEmpty; }
    7878static inline bool has_waiting_consumers( channel(T) & chan ) with(chan) { return !cons`isEmpty; }
Note: See TracChangeset for help on using the changeset viewer.