[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#637424: Implement amd64_set_gsbase and i386_set_fsbase



Hi,

I do not like the idea of adding
amd64_set_gsbase and i386_set_fsbase into our shared libc.

The only user so far is wine,
it already have OS specific setting of fs/gs.

#if defined __linux__
    arch_prctl( ARCH_SET_GS, teb );
#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
    amd64_set_gsbase( teb );
#else
# error Please define setting %gs for your architecture
#endif


The best way should be to alter wine to use sysarch directly,
just "sysarch (AMD64_SET_GSBASE, &teb)"
instead of "amd64_set_gsbase( teb )"

The second option is to insert into
<machine/sysarch.h> "always inline" functions.

Petr







Reply to: