Ignore:
Timestamp:
Aug 31, 2022, 11:55:47 AM (22 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
594e1db
Parents:
e5c04b9
Message:

Changed declarations using _Thread_local to use thread.
I'm fairly sure they do exactly the same, but
thread is:

  • more consistent with uC++.
  • Shorter.
  • Better documented.
Location:
libcfa/src/concurrency/kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel/fwd.hfa

    re5c04b9 r1bcbf02  
    3535extern "C" {
    3636        extern "Cforall" {
    37                 extern __attribute__((aligned(64))) _Thread_local struct KernelThreadData {
     37                extern __attribute__((aligned(64))) __thread struct KernelThreadData {
    3838                        struct thread$          * volatile this_thread;
    3939                        struct processor        * volatile this_processor;
  • libcfa/src/concurrency/kernel/private.hfa

    re5c04b9 r1bcbf02  
    8888#elif defined(CFA_HAVE_LINUX_RSEQ_H)
    8989        extern "Cforall" {
    90                 extern __attribute__((aligned(64))) _Thread_local volatile struct rseq __cfaabi_rseq;
     90                extern __attribute__((aligned(64))) __thread volatile struct rseq __cfaabi_rseq;
    9191        }
    9292#else
  • libcfa/src/concurrency/kernel/startup.cfa

    re5c04b9 r1bcbf02  
    133133//-----------------------------------------------------------------------------
    134134// Global state
    135 _Thread_local struct KernelThreadData __cfaabi_tls __attribute__ ((tls_model ( "initial-exec" ))) @= {
     135__thread struct KernelThreadData __cfaabi_tls __attribute__ ((tls_model ( "initial-exec" ))) @= {
    136136        NULL,                                                                                           // cannot use 0p
    137137        NULL,
     
    153153#elif defined(CFA_HAVE_LINUX_RSEQ_H)
    154154        extern "Cforall" {
    155                 __attribute__((aligned(64))) _Thread_local volatile struct rseq __cfaabi_rseq @= {
     155                __attribute__((aligned(64))) __thread volatile struct rseq __cfaabi_rseq @= {
    156156                        .cpu_id : RSEQ_CPU_ID_UNINITIALIZED,
    157157                };
Note: See TracChangeset for help on using the changeset viewer.