Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3588 → Rev 3589

/branches/dynload/uspace/lib/rtld/arch/ppc32/src/runtime.c
50,23 → 50,23
) ;
}
 
typedef struct {
unsigned long int ti_module;
unsigned long int ti_offset;
} tls_index;
//typedef struct {
// unsigned long int ti_module;
// unsigned long int ti_offset;
//} tls_index;
 
void *__tls_get_addr(tls_index *ti);
//void *__tls_get_addr(tls_index *ti);
 
/* ppc32 uses TLS variant 1 */
void *__tls_get_addr(tls_index *ti)
{
uint8_t *tls;
///* ppc32 uses TLS variant 1 */
//void *__tls_get_addr(tls_index *ti)
//{
// uint8_t *tls;
//
// /* The TLS section is just after TCB */
// tls = (uint8_t *)__tcb_get() + sizeof(tcb_t);
//
// return tls + ti->ti_offset;
//}
 
/* The TLS section is just after TCB */
tls = (uint8_t *)__tcb_get() + sizeof(tcb_t);
 
return tls + ti->ti_offset;
}
 
/** @}
*/