Ignore:
Timestamp:
Oct 31, 2022, 3:00:01 PM (21 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/invoke.h

    r637c139 rcd5b58f  
    195195                struct __monitor_group_t monitors;
    196196
    197                 // used to put threads on dlist data structure
     197                // intrusive link fields, used for locks, monitors and any user defined data structure
     198                // default link fields for dlist
    198199                __cfa_dlink1(thread$) user_link;
    199200
    200                 struct {
    201                         struct thread$ * next;
    202                         struct thread$ * prev;
    203                 } node;
     201                // secondary intrusive link fields, used for global cluster list
     202                // default link fields for dlist
     203                __cfa_dlink2(thread$, cltr_link);
    204204
    205205                // used to store state between clh lock/unlock
     
    230230        #ifdef __cforall
    231231        extern "Cforall" {
     232                static inline thread$ * volatile & ?`next ( thread$ * this ) {
     233                        return this->user_link.next;
     234                }
    232235
    233236                static inline thread$ *& get_next( thread$ & this ) __attribute__((const)) {
    234237                        return this.user_link.next;
    235                 }
    236 
    237                 static inline [thread$ *&, thread$ *& ] __get( thread$ & this ) __attribute__((const)) {
    238                         return this.node.[next, prev];
    239238                }
    240239
     
    244243                        return result;
    245244                }
     245
     246                P9_EMBEDDED(thread$, thread$.cltr_link)
     247                P9_EMBEDDED(thread$.cltr_link, dlink(thread$))
    246248
    247249                static inline void ?{}(__monitor_group_t & this) {
Note: See TracChangeset for help on using the changeset viewer.