Ignore:
Timestamp:
Nov 10, 2022, 2:19:51 PM (18 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master
Children:
1553a55, 71806e0
Parents:
a757ba1
Message:

Changed cluster link to use explicit type to avoid anonymous names in symbols gdb cares about

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/invoke.h

    ra757ba1 r639e4fc  
    146146
    147147        // Link lists fields
    148         // instrusive link field for threads
     148        // instrusive link field for threads in the ready-queue
    149149        struct __thread_desc_link {
    150150                struct thread$ * next;
    151151                volatile unsigned long long ts;
    152152        };
     153
     154        // Link lists fields
     155        // instrusive link field for threads in the user_link/cltr_link
     156        struct __thread_user_link {
     157                #ifdef __cforall
     158                        inline dlink(thread$);
     159                #else
     160                        struct thread$ * next; struct thread$ * back;
     161                #endif
     162        };
     163        _Static_assert(sizeof(struct __thread_user_link) == 2 * sizeof(struct thread$ *), "__thread_user_link should be consistent in C and Cforall");
    153164
    154165        struct thread$ {
     
    197208                // intrusive link fields, used for locks, monitors and any user defined data structure
    198209                // default link fields for dlist
    199                 __cfa_dlink(thread$) user_link;
     210                struct __thread_user_link user_link;
    200211
    201212                // secondary intrusive link fields, used for global cluster list
    202213                // default link fields for dlist
    203                 __cfa_dlink(thread$) cltr_link;
     214                struct __thread_user_link cltr_link;
    204215
    205216                // used to store state between clh lock/unlock
     
    244255                }
    245256
    246                 static inline tytagref(typeof(((struct thread$ *)0p)->cltr_link), dlink(thread$)) ?`inner( struct thread$ & this ) {
    247                         typeof(this.cltr_link) & ib = this.cltr_link;
     257                static inline tytagref(struct __thread_user_link, dlink(thread$)) ?`inner( struct thread$ & this ) {
     258                        struct __thread_user_link & ib = this.cltr_link;
    248259                        dlink(thread$) & b = ib`inner;
    249                         tytagref(typeof(this.cltr_link), dlink(thread$)) result = { b };
     260                        tytagref(struct __thread_user_link, dlink(thread$)) result = { b };
    250261                        return result;
    251262                }
    252263
    253                 P9_EMBEDDED(typeof(((struct thread$ *)0p)->cltr_link), dlink(thread$))
     264                P9_EMBEDDED(struct __thread_user_link, dlink(thread$))
    254265
    255266                static inline void ?{}(__monitor_group_t & this) {
Note: See TracChangeset for help on using the changeset viewer.