Ignore:
File:
1 edited

Legend:

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

    r6340b4d2 rffccdff0  
    3737
    3838#include <assert.h>
     39#include <stdalign.h>
    3940#include <stddef.h>
    4041#include <align.h>
     
    6970#else
    7071        size_t tls_size = tls ? tls->p_memsz : 0;
    71         return -ALIGN_UP((ptrdiff_t) tls_size, max(tls_align, _Alignof(tcb_t)));
     72        return -ALIGN_UP((ptrdiff_t) tls_size, max(tls_align, alignof(tcb_t)));
    7273#endif
    7374}
     
    104105#else
    105106        size_t alloc_size =
    106             ALIGN_UP(tls_size, max(tls_align, _Alignof(tcb_t))) + sizeof(tcb_t);
    107 #endif
    108 
    109         void *area = alloc(max(tls_align, _Alignof(tcb_t)), alloc_size);
     107            ALIGN_UP(tls_size, max(tls_align, alignof(tcb_t))) + sizeof(tcb_t);
     108#endif
     109
     110        void *area = alloc(max(tls_align, alignof(tcb_t)), alloc_size);
    110111        if (!area)
    111112                return NULL;
     
    187188        tls_free_arch(tcb,
    188189            ALIGN_UP(tls->p_memsz, tls->p_align) + sizeof(tcb_t),
    189             max(tls->p_align, _Alignof(tcb_t)));
     190            max(tls->p_align, alignof(tcb_t)));
    190191}
    191192
Note: See TracChangeset for help on using the changeset viewer.