Messages in this thread |  | | Date | Fri, 16 Aug 2002 19:12:45 +0200 (CEST) | From | Ingo Molnar <> | Subject | Re: CLONE_DETACHED and exit notification (was user-vm-unlock-2.5.31-A2) |
| |
On Fri, 16 Aug 2002, Jamie Lokier wrote:
> There's no "lock-counter format", because this isn't a lock -- it's a > wakeup. There no need for atomicity either, because the listener only > reads, it doesn't write.
well, technically a 'wait until value is 0' thing is of course a counter format ...
> Here's a synchronous thread_join-style waiter; it is architecture-neutral: > > while (tid = *tid_address) != 0) > retval = sys_futex (tid_address, FUTEX_WAIT, tid, 0);
yes, this would work. And the current method of setting the counter to 0 is arbitrary (and has a 'format') already, so there's no reason we couldnt say that the TID cannot be used as a thread-join futex that is zeroed out by CLONE_CLEARTID, and any (potential) waiters are woken up.
i'll try this and send a patch, it's a nice optimization.
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/
|  |