Ignore:
Timestamp:
Mar 29, 2026, 11:03:25 PM (9 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
c1f17aa
Parents:
81ab5eb
Message:

3rd attempt at harmonizing isOp functions, e.g., isListed, isFirst, isLast

Location:
libcfa/src/concurrency
Files:
4 edited

Legend:

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

    r81ab5eb re6e250d  
    369369        ///////////////////////////////////////////////////////////////////////////////////////////
    370370        bool unregister_chan( channel(T) & chan, select_node & node ) with(chan) {
    371             if ( ! isListed( node ) && ! node.park_counter ) return false; // handle special OR case
     371            if ( ! listed( node ) && ! node.park_counter ) return false; // handle special OR case
    372372            lock( mutex_lock );
    373             if ( isListed( node ) ) { // op wasn't performed
     373            if ( listed( node ) ) { // op wasn't performed
    374374                remove( node );
    375375                unlock( mutex_lock );
  • libcfa/src/concurrency/future.hfa

    r81ab5eb re6e250d  
    1010// Created On       : Wed Jan 06 17:33:18 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Mar 29 21:13:04 2026
    13 // Update Count     : 223
     12// Last Modified On : Sun Mar 29 22:47:01 2026
     13// Update Count     : 224
    1414//
    1515
     
    7979
    8080                bool unregister_select$( future(T) & fut, select_node & s ) with( fut ) { // for waituntil statement
    81                   if ( ! isListed( s ) ) return false;
    82                         lock( lock );
    83                         if ( isListed( s ) ) remove( s );
     81                  if ( ! listed( s ) ) return false;
     82                        lock( lock );
     83                        if ( listed( s ) ) remove( s );
    8484                        unlock( lock );
    8585                        return false;
  • libcfa/src/concurrency/locks.cfa

    r81ab5eb re6e250d  
    220220bool unregister_select$( blocking_lock & this, select_node & node ) with(this) {
    221221        lock( lock __cfaabi_dbg_ctx2 );
    222         if ( isListed( node ) ) {
     222        if ( listed( node ) ) {
    223223                remove( node );
    224224                wait_count--;
     
    265265                //      may still be called after a thread has been removed from the queue but
    266266                //      before the alarm is unregistered
    267                 if ( isListed( *info_thd ) ) {                                  // is thread on queue
     267                if ( listed( *info_thd ) ) {                                    // is thread on queue
    268268                        info_thd->signalled = false;
    269269                        // remove this thread O(1)
     
    304304                //      may still be called after a thread has been removed from the queue but
    305305                //      before the alarm is unregistered
    306                 if ( isListed( *info_thd ) ) {                                  // is thread on queue
     306                if ( listed( *info_thd ) ) {                                    // is thread on queue
    307307                        info_thd->signalled = false;
    308308                        // remove this thread O(1)
  • libcfa/src/concurrency/locks.hfa

    r81ab5eb re6e250d  
    1111// Created On       : Thu Jan 21 19:46:50 2021
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sun Nov 23 22:38:45 2025
    14 // Update Count     : 67
     13// Last Modified On : Sun Mar 29 22:46:39 2026
     14// Update Count     : 68
    1515//
    1616
     
    645645static inline bool unregister_select$( simple_owner_lock & this, select_node & node ) with( this ) {
    646646        lock( lock __cfaabi_dbg_ctx2 );
    647         if ( isListed( node ) ) {
     647        if ( listed( node ) ) {
    648648                remove( node );
    649649                unlock( lock );
Note: See TracChangeset for help on using the changeset viewer.