Changeset e2f26002 in mainline for uspace/lib/c/generic/tls.c


Ignore:
Timestamp:
2016-05-17T17:15:13Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d2bb25e7
Parents:
bab0f42
Message:

symbol_get_addr() must treat thread-local variables differently than normal variables.

File:
1 edited

Legend:

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

    rbab0f42 re2f26002  
    5252#endif
    5353        return &_tbss_end - &_tdata_start;
     54}
     55
     56/** Get address of static TLS block */
     57void *tls_get(void)
     58{
     59#ifdef CONFIG_TLS_VARIANT_1
     60        return (uint8_t *)__tcb_get() + sizeof(tcb_t);
     61#else /* CONFIG_TLS_VARIANT_2 */
     62        return (uint8_t *)__tcb_get() - tls_get_size();
     63#endif
    5464}
    5565
Note: See TracChangeset for help on using the changeset viewer.