Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1624 → Rev 1623

/uspace/trunk/libc/arch/ppc32/src/thread.c
37,14 → 37,15
*/
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;
tcb_t *tcb;
*data = malloc(sizeof(tcb_t) + size);
tcb = (tcb_t *) (*data + size);
return tcb;
}
 
void __free_tls_arch(tcb_t *tcb, size_t size)
{
free(tcb);
void *start = ((void *) tcb) - size;
free(start);
}