33,27 → 33,17 |
* @ingroup libcmips32eb |
*/ |
|
#include <thread.h> |
#include <malloc.h> |
#include <tls.h> |
#include <sys/types.h> |
|
/** Allocate TLS & TCB for initial module threads |
* |
* @param data (out) Start of TLS section |
* @param size Size of tdata+tbss section |
* @return pointer to tcb_t structure |
*/ |
tcb_t * __alloc_tls(void **data, size_t size) |
{ |
tcb_t *result; |
|
result = malloc(sizeof(tcb_t) + size); |
*data = ((void *)result) + sizeof(tcb_t); |
return result; |
return tls_alloc_variant_1(data, size); |
} |
|
void __free_tls_arch(tcb_t *tcb, size_t size) |
{ |
free(tcb); |
tls_free_variant_1(tcb, size); |
} |
|
/** @} |