Subversion Repositories HelenOS

Rev

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

Rev 3386 Rev 4153
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;