I didn't realize Posix threads were that inefficient?
First, I can't see why the memory overhead would be anything more than having a separate stack and entry in the TCB?
Second, can you not just save the stack pointer, program counter and registers into the TCB, then do the reverse when restoring a thread?
Finally, I wouldn't have thought you'd have too many TLB misses either, thus leaving the only expense being trapping to the kernel to switch between threads?
Can anyone explain?