Ignore:
File:
1 edited

Legend:

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

    r1bcbf02 rb035046  
    113113KERNEL_STORAGE(thread$,              mainThread);
    114114KERNEL_STORAGE(__stack_t,            mainThreadCtx);
    115 // KERNEL_STORAGE(__scheduler_RWLock_t, __scheduler_lock);
     115KERNEL_STORAGE(__scheduler_RWLock_t, __scheduler_lock);
    116116KERNEL_STORAGE(eventfd_t,            mainIdleEventFd);
    117117KERNEL_STORAGE(io_future_t,          mainIdleFuture);
     
    123123processor            * mainProcessor;
    124124thread$              * mainThread;
     125__scheduler_RWLock_t * __scheduler_lock;
    125126
    126127extern "C" {
     
    133134//-----------------------------------------------------------------------------
    134135// Global state
    135 __thread struct KernelThreadData __cfaabi_tls __attribute__ ((tls_model ( "initial-exec" ))) @= {
     136thread_local struct KernelThreadData __cfaabi_tls __attribute__ ((tls_model ( "initial-exec" ))) @= {
    136137        NULL,                                                                                           // cannot use 0p
    137138        NULL,
     
    147148};
    148149
    149 __scheduler_RWLock_t __scheduler_lock @= { 0 };
    150 
    151150#if   defined(CFA_HAVE_LINUX_LIBRSEQ)
    152151        // No data needed
    153152#elif defined(CFA_HAVE_LINUX_RSEQ_H)
    154153        extern "Cforall" {
    155                 __attribute__((aligned(64))) __thread volatile struct rseq __cfaabi_rseq @= {
     154                __attribute__((aligned(128))) thread_local volatile struct rseq __cfaabi_rseq @= {
    156155                        .cpu_id : RSEQ_CPU_ID_UNINITIALIZED,
    157156                };
     
    199198
    200199        // Initialize the global scheduler lock
    201         // __scheduler_lock = (__scheduler_RWLock_t*)&storage___scheduler_lock;
    202         (__scheduler_lock){};
     200        __scheduler_lock = (__scheduler_RWLock_t*)&storage___scheduler_lock;
     201        (*__scheduler_lock){};
    203202
    204203        // Initialize the main cluster
     
    337336        ^(*mainCluster){};
    338337
    339         ^(__scheduler_lock){};
     338        ^(*__scheduler_lock){};
    340339
    341340        ^(__cfa_dbg_global_clusters.list){};
Note: See TracChangeset for help on using the changeset viewer.