[RFC] EINTR and PC loser-ing library design
Torvald Riegel
triegel@redhat.com
Mon Dec 8 16:22:00 GMT 2014
On Mon, 2014-12-08 at 14:28 +0100, Florian Weimer wrote:
> On 12/08/2014 02:22 PM, danny.milo+a@gmail.com wrote:
> > - add an intr_handler callback (pointer) to glibc, setable by the user, defaulting to one just returning (-1).
>
> Using a callback is very dubious because it is difficult to specify its
> semantics, and it will negatively interfere with current and future
> compiler optimizations.
>
> Maybe a thread-local flag which controls retry-on-EINTR behavior might
> make sense, but it's reasonable to check what other systems do first
> (and perhaps bring this up in the Austin working group for POSIX
> standardization).
Thread-local flags are problematic too because they increase the state
you need to save/restore or initialize when running lots of parallel
tasks with work stealing on a thread pool, for example.
More information about the Libc-alpha
mailing list