Changeset 49caf644 for libcfa/src


Ignore:
Timestamp:
Jul 18, 2023, 4:41:37 PM (11 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
8a1d62b6
Parents:
c635047 (diff), da6db1a2 (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/channel.hfa

    rc635047 r49caf644  
    326326    return retval;
    327327}
     328static inline void remove( channel(T) & chan ) { T elem = (T)remove( chan ); }
     329
    328330
    329331///////////////////////////////////////////////////////////////////////////////////////////
     
    461463}
    462464
     465// type used by select statement to capture a chan read as the selected operation that doesn't have a param to read to
     466struct chan_read_no_ret {
     467    T ret;
     468    chan_read( T ) cr;
     469};
     470__CFA_SELECT_GET_TYPE( chan_read_no_ret(T) );
     471
     472static inline void ?{}( chan_read_no_ret(T) & this, channel(T) & chan ) {
     473    this.cr{ chan, this.ret };
     474}
     475static inline chan_read_no_ret(T) remove( channel(T) & chan ) { chan_read_no_ret(T) cr{ chan }; return cr; }
     476static inline bool register_select( chan_read_no_ret(T) & this, select_node & node ) { return register_select( this.cr, node ); }
     477static inline bool unregister_select( chan_read_no_ret(T) & this, select_node & node ) { return unregister_select( this.cr, node ); }
     478static inline bool on_selected( chan_read_no_ret(T) & this, select_node & node ) { return on_selected( this.cr, node ); }
     479
    463480// type used by select statement to capture a chan write as the selected operation
    464481struct chan_write {
Note: See TracChangeset for help on using the changeset viewer.