Changeset fa23560 in mainline for uspace/lib/libc/arch/ia64/src/tls.c


Ignore:
Timestamp:
2007-10-30T22:54:11Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d21cf8
Parents:
b2a0f6dd
Message:

Unify implementations of TLS variant I and variant II alloc_tls() and
free_tls_arch().

File:
1 moved

Legend:

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

    rb2a0f6dd rfa23560  
    3535 */
    3636
    37 #include <thread.h>
     37#include <tls.h>
    3838#include <malloc.h>
    3939
    40 /** Allocate TLS & TCB for initial module threads
    41  *
    42  * @param data Start of data section
    43  * @return pointer to tcb_t structure
    44  */
    45 extern char _tdata_start;
    46 extern char _tbss_end;
    4740tcb_t * __alloc_tls(void **data, size_t size)
    4841{
    49         tcb_t *tcb;
    50        
    51 /*      ASSERT(sizeof(tcb_t) == 16); */
    52 
    53         tcb = malloc(sizeof(tcb_t) + size);
    54         *data = ((void *) tcb) + 16;
    55 
    56         return tcb;
     42        return tls_alloc_variant_1(data, size);
    5743}
    5844
    5945void __free_tls_arch(tcb_t *tcb, size_t size)
    6046{
    61         free(tcb);
     47        tls_free_variant_1(tcb, size);
    6248}
    6349
Note: See TracChangeset for help on using the changeset viewer.