How is a thread's initial context (registers state) determined on thread creation?
For example: Current thread context eax=0x4, ebx=0x9000, ecx=0xfff, etc... Create a thread is called to begin executing at 0xbfbfbf. It seems obvious that the thread's eip will be set to 0xbfbfbf, but how about the other registers. Are they copied from the current thread? Are they set to 0x00000000? Is the stack pointer the same? I want to know what happens to the initial thread context at thread creation. I've checked google and OS internals books and haven't found what I'm looking for.
Also, is it the same process across other OS, in particular Linux and Windows?