skaller <[EMAIL PROTECTED]> writes: > Neko, for example, uses a register. AFAIK MLton does the > same kind of thing. If gcc team thinks ANY register is free > to steal they'd be wrong -- that doesn't mean it shouldn't > be used, just that it definitely is NOT free.
To be clear, it is not the gcc team which is stealing the register. As I said earlier, TLS (i.e., __thread) was defined by Sun. They defined the implementation for i386 and SPARC. Other organizations have carried it forward to other processors. Here is the Sun documentation: http://docs.sun.com/app/docs/doc/817-1984/6mhm7pl2a TLS is implemented via a combination of the compiler, the system library, and the kernel. As I said before, the register is only stolen for code which actually uses TLS. Ian