Subversion Repositories HelenOS

Rev

Rev 2927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2927 Rev 3772
Line 44... Line 44...
44
void __free_tls_arch(tcb_t *tcb, size_t size)
44
void __free_tls_arch(tcb_t *tcb, size_t size)
45
{
45
{
46
    tls_free_variant_1(tcb, size);
46
    tls_free_variant_1(tcb, size);
47
}
47
}
48
 
48
 
-
 
49
typedef struct {
-
 
50
    unsigned long ti_module;
-
 
51
    unsigned long ti_offset;
-
 
52
} tls_index;
-
 
53
 
-
 
54
void *__tls_get_addr(tls_index *ti);
-
 
55
 
-
 
56
/* mips32 uses TLS variant 1 */
-
 
57
void *__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
 
49
/** @}
69
/** @}
50
 */
70
 */