|
From: Evan G. <th...@gm...> - 2008-09-03 02:41:59
|
So, I'm running into a problem. TLS stuff is usually stored in some register, but on some ARMs it can be emulated by putting the value somewhere in a commpage in high memory, so all interaction with the TLS is done either through the arm specific set_tls syscall, and by jumping into the commpage in high memory, which will either set the TLS register (that some ARMs have), or alternatively the kernel puts a store to some location in the commpage. Right now I have a field in ThreadOSState, which is ifdef'd out for everything but arm on linux, and I added a bit of code right before the switch in the scheduler that traps accesses to the commpage. Fortunately it can be out of the fast path in the dispatcher, since access to the commpage will always result in a fast cache miss due to it never getting translated. This really doesn't seem all that kosher at all. What would be the proper place to put the thread pointer? |