[lkml]   [2002]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.095 / U:11.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site