4 ms·
Linux has support for a futex "robust list", which handles the exact case you're talking about: https://www.kernel.org/doc/Documentation/robust-futexes.txt http
by amscanne 6y ago
Linux has support for a futex "robust list", which handles the exact case you're talking about:
https://www.kernel.org/doc/Documentation/robust-futexes.txt https://www.kernel.org/doc/Documentation/robust-futexes.txt
(Ironic that you said there is no "robust" solution. They are also exposed via pthread_mutex as a robust attribute.)
But no one really uses robust futexes. Why? I think the problem of distributed co-ordination is fundamentally complex, and people prefer to deal with complexity they create than trying to understand other complex solutions. (I'm not saying that this bias is wrong.)
So it's a bit sad that you're sad about the kernel not providing something that is does indeed provide!
- ot 6y agoTBH it is the third or fourth time I come across robust futexes, try to get my head around them, give up, and forget about them. Futexes are a low-level primitive, I was talking about high-level primitives such as mutexes, condvars, and semaphores. If nobody has succeeded in implementing them on top of robust futexes, for practical purposes it's as if they don't exist.
- amscanne 6y agoDid you miss where I noted they are supported by pthread? I think you’re giving up way too quickly :)