Subversion Repositories HelenOS

Rev

Rev 2927 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2927 Rev 3535
Line 114... Line 114...
114
tcb_t * tls_alloc_variant_2(void **data, size_t size)
114
tcb_t * tls_alloc_variant_2(void **data, size_t size)
115
{
115
{
116
    tcb_t *tcb;
116
    tcb_t *tcb;
117
   
117
   
118
    size = ALIGN_UP(size, &_tls_alignment);
118
    size = ALIGN_UP(size, &_tls_alignment);
119
    *data = memalign(&_tls_alignment, sizeof(tcb_t) + size);
119
    *data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size);
120
 
120
 
121
    tcb = (tcb_t *) (*data + size);
121
    tcb = (tcb_t *) (*data + size);
122
    tcb->self = tcb;
122
    tcb->self = tcb;
123
 
123
 
124
    return tcb;
124
    return tcb;