This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fs/gs for thread local storage


Hi,

x86_64 uses fs register for tls while x86_32 uses gs register.  I am
interested in using the spare register(gs on 64bit and fs on 32bit)
for my own purpose.  Are they available ? arch_prctl has ARCH_SET_GS
option so I assume that is available. But on 32 bit the kernels struct
thread_struct  in task_struct doesn't have fs register. Does that mean
it is available or used for some other purpose.

I am curious if there is any reason why both architectures picked
different registers.

thank you,
Ved

PS: Can you cc me on the reply. I am not subscribed to the list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]