Re: [patch] user-vm-unlock-2.5.31-A2

From: Ingo Molnar (mingo@elte.hu)
Date: Thu Aug 15 2002 - 01:45:23 EST


On Thu, 15 Aug 2002, Jamie Lokier wrote:

> I wonder if it makes more sense for the release word to be a futex --
> then various ways of actually waiting for the stack are available.

the window for locking is really small (and will always be small), so it's
cheaper for the fastpath to implement this as a spinlock, with the
stack-user being the lock holder.

> It would be nice if the stored word were the exit() code, too. This
> would remove the need for zombie threads even when an exit status is
> desired.

this is an unrelated issue from the user-vm-unlock thing. pthread_join()
(the new, futex based variant) already uses a futex (well, internal
pthreads mutex that in turn uses a futex) which also stores the exit code,
so threads are always be created in a detached state. But there are cases
when this is unnecessery, eg. when a thread later on calls
pthread_detach().

        Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:38 EST