>>the inferno version posted by charles fixes this. actually i sent that privately, but it's fairly obvious (once you know the dangers). the mess in that one is that it needs assembly language in order to have precise control over access to the stack and to allow an INT $SYS_exit or whatever to be made without using the (user) stack, so that you need to do the raw INT yourself, not call _exit, after unlocking the global stack allocation Lock. void unlockandexit(Lock*). ugh. it also can't simply free() the stack, but can only recycle it, though you could fix that one by queueing the stack for freeing by the next stackalloc once it's past the global lock. now, go hug a TLB!