Changeset fa23560 in mainline for uspace/lib/libc/arch/mips32/src


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/mips32/src/tls.c

    rb2a0f6dd rfa23560  
    3434 */
    3535
    36 #include <thread.h>
    37 #include <malloc.h>
     36#include <tls.h>
     37#include <sys/types.h>
    3838
    39 /** Allocate TLS & TCB for initial module threads
    40  *
    41  * @param data (out) Start of TLS section
    42  * @param size Size of tdata+tbss section
    43  * @return pointer to tcb_t structure
    44  */
    4539tcb_t * __alloc_tls(void **data, size_t size)
    4640{
    47         tcb_t *result;
    48 
    49         result = malloc(sizeof(tcb_t) + size);
    50         *data = ((void *)result) + sizeof(tcb_t);
    51         return result;
     41        return tls_alloc_variant_1(data, size);
    5242}
    5343
    5444void __free_tls_arch(tcb_t *tcb, size_t size)
    5545{
    56         free(tcb);
     46        tls_free_variant_1(tcb, size);
    5747}
    5848
Note: See TracChangeset for help on using the changeset viewer.