Re: Change in functionality of futex() system call.

From: Eric Dumazet
Date: Thu Jun 09 2011 - 01:25:44 EST


Le jeudi 09 juin 2011 Ã 00:43 -0400, George Spelvin a Ãcrit :

> Just for example, consider a circular buffer that a few (trusted)
> processes can write to, but many (less trusted) can read. Obviously,
> being able to sleep on the head pointer is useful.


If its useful, then it needs a futex extension (and this must be
emulated on old kernels without this extension)

Remember futex_wake() call would just have to wakeup _all_ threads
instead of one, if kernel lacks this function.

If you dont trust futex_wait() users, just use futex_wake(ALL)

Its should not be a consequence of a previous (unrelated) patch, it
should be an added functionality, dully documented.



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