Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3551 → Rev 3552

/branches/dynload/uspace/lib/rtld/arch/ia32/src/runtime.c
58,20 → 58,20
void __attribute__ ((__regparm__ (1)))
*___tls_get_addr(tls_index *ti);
 
void __attribute__ ((__regparm__ (1)))
*___tls_get_addr(tls_index *ti)
{
size_t tls_size;
uint8_t *tls;
//void __attribute__ ((__regparm__ (1)))
// *___tls_get_addr(tls_index *ti)
//{
// size_t tls_size;
// uint8_t *tls;
//
// /* Calculate size of TLS block */
// tls_size = ALIGN_UP(&_tbss_end - &_tdata_start, &_tls_alignment);
//
// /* The TLS block is just before TCB */
// tls = (uint8_t *)__tcb_get() - tls_size;
//
// return tls + ti->ti_offset;
//}
 
/* Calculate size of TLS block */
tls_size = ALIGN_UP(&_tbss_end - &_tdata_start, &_tls_alignment);
 
/* The TLS block is just before TCB */
tls = (uint8_t *)__tcb_get() - tls_size;
 
return tls + ti->ti_offset;
}
 
/** @}
*/