Ignore:
Timestamp:
Oct 31, 2022, 3:00:01 PM (22 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master
Children:
7f3b5ce
Parents:
637c139
Message:

Changed node link in thread to use dlink called cltr_link

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel/startup.cfa

    r637c139 rcd5b58f  
    535535        #endif
    536536
    537         node.next = 0p;
    538         node.prev = 0p;
    539537        doregister(curr_cluster, this);
    540538
     
    659657        #endif
    660658
    661         threads{ __get };
     659        threads{};
    662660
    663661        io.arbiter = create();
     
    739737        lock      (cltr->thread_list_lock __cfaabi_dbg_ctx2);
    740738        cltr->nthreads += 1;
    741         push_front(cltr->threads, thrd);
     739        insert_first(cltr->threads, thrd);
    742740        unlock    (cltr->thread_list_lock);
    743741}
     
    745743void unregister( cluster * cltr, thread$ & thrd ) {
    746744        lock  (cltr->thread_list_lock __cfaabi_dbg_ctx2);
    747         remove(cltr->threads, thrd );
    748         cltr->nthreads -= 1;
     745        {
     746                tytagref( dlink(thread$), dlink(thread$) ) ?`inner( thread$ & this ) = void;
     747                with( DLINK_VIA( thread$, thread$.cltr_link ) )
     748                        remove( thrd );
     749                cltr->nthreads -= 1;
     750        }
    749751        unlock(cltr->thread_list_lock);
    750752}
Note: See TracChangeset for help on using the changeset viewer.