Changeset fa23560 in mainline for uspace/lib/libc/arch/ppc32/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/ppc32/src/tls.c

    rb2a0f6dd rfa23560  
    3333 */
    3434
    35 #include <thread.h>
    36 #include <malloc.h>
     35#include <tls.h>
     36#include <sys/types.h>
    3737
    38 /** Allocate TLS & TCB for initial module threads
    39  *
    40  * @param data Start of data section
    41  * @return pointer to tcb_t structure
    42  *
    43  */
    4438tcb_t * __alloc_tls(void **data, size_t size)
    4539{
    46         tcb_t *result;
    47 
    48         result = malloc(sizeof(tcb_t) + size);
    49         *data = ((void *)result) + sizeof(tcb_t);
    50         return result;
     40        return tls_alloc_variant_1(data, size);
    5141}
    5242
    5343void __free_tls_arch(tcb_t *tcb, size_t size)
    5444{
    55         free(tcb);
     45        tls_free_variant_1(tcb, size);
    5646}
    5747
Note: See TracChangeset for help on using the changeset viewer.