Changeset 91e4567 in mainline for uspace/lib/c/generic/tls.c


Ignore:
Timestamp:
2016-05-06T15:21:22Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dc9a474
Parents:
7c4b26c
Message:

runtime_env must be set early, before calling fibril_setup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/tls.c

    r7c4b26c r91e4567  
    4747size_t tls_get_size(void)
    4848{
     49#ifdef CONFIG_RTLD
     50        if (runtime_env != NULL)
     51                return runtime_env->tls_size;
     52#endif
    4953        return &_tbss_end - &_tdata_start;
    5054}
     
    8387void tls_free(tcb_t *tcb)
    8488{
    85         size_t tls_size = &_tbss_end - &_tdata_start;
    86 
    87 #ifdef CONFIG_RTLD
    88         if (runtime_env != NULL)
    89                 tls_size = runtime_env->tls_size;
    90 #endif
    91         tls_free_arch(tcb, tls_size);
     89        tls_free_arch(tcb, tls_get_size());
    9290}
    9391
Note: See TracChangeset for help on using the changeset viewer.