Ignore:
File:
1 edited

Legend:

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

    rde94a60 r4c1b48f3  
    1818#include "bits/locks.h"
    1919
    20 #define TL_GET( member ) kernelTLS.member
    21 #define TL_SET( member, value ) kernelTLS.member = value;
     20#define TL_GET( member ) kernelThreadData.member
     21#define TL_SET( member, value ) kernelThreadData.member = value;
    2222
    2323#ifdef __cforall
     
    4444                                volatile bool in_progress;
    4545                        } preemption_state;
    46                 } kernelTLS;
     46                } kernelThreadData;
    4747        }
    4848
    4949        static inline struct coroutine_desc * volatile active_coroutine() { return TL_GET( this_coroutine ); }
    50         static inline struct thread_desc    * volatile active_thread   () { return TL_GET( this_thread    ); }
    51         static inline struct processor      * volatile active_processor() { return TL_GET( this_processor ); } // UNSAFE
     50        static inline struct thread_desc * volatile active_thread() { return TL_GET( this_thread ); }
     51        static inline struct processor * volatile active_processor() { return TL_GET( this_processor ); }
    5252        #endif
    5353
     
    126126                struct monitor_desc *  self_mon_p;
    127127
    128                 // pointer to the cluster on which the thread is running
    129                 struct cluster * curr_cluster;
    130 
    131128                // monitors currently held by this thread
    132129                struct __monitor_group_t monitors;
     
    136133                struct thread_desc * next;
    137134
    138                 struct {
    139                         struct thread_desc * next;
    140                         struct thread_desc * prev;
    141                 } node;
     135                __cfaabi_dbg_debug_do(
     136                        // instrusive link field for debugging
     137                        struct thread_desc * dbg_next;
     138                        struct thread_desc * dbg_prev;
     139                )
    142140     };
    143141
     
    146144                static inline thread_desc * & get_next( thread_desc & this ) {
    147145                        return this.next;
    148                 }
    149 
    150                 static inline [thread_desc *&, thread_desc *& ] __get( thread_desc & this ) {
    151                         return this.node.[next, prev];
    152146                }
    153147
Note: See TracChangeset for help on using the changeset viewer.