Ignore:
Timestamp:
2009-08-20T20:47:35Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b50b5af2
Parents:
24edc18
Message:

Merge changes from original Subversion dynload branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/mips32/src/tls.c

    r24edc18 r1ea99cc  
    4747}
    4848
     49typedef struct {
     50        unsigned long ti_module;
     51        unsigned long ti_offset;
     52} tls_index;
     53
     54void *__tls_get_addr(tls_index *ti);
     55
     56/* mips32 uses TLS variant 1 */
     57void *__tls_get_addr(tls_index *ti)
     58{
     59        uint8_t *tls;
     60        uint32_t v;
     61
     62        tls = (uint8_t *)__tcb_get() + sizeof(tcb_t);
     63
     64        /* Hopefully this is right. No docs found. */
     65        v = (uint32_t) (tls + ti->ti_offset + 0x8000);
     66        return (void *) v;
     67}
     68
    4969/** @}
    5070 */
Note: See TracChangeset for help on using the changeset viewer.