Daniel, I saw your code in thr_kern.c assumes that a blocked thread in kernel will always be returned in same upcall(your userland kse)? However, current kernel will returned this context in one of upcall in the same ksegrp, so there is race in your code, I think this may be a kernel bug but not yours, this does not very respects original paper. David Xu