[PATCH 1/3] Use reliable sem_wait interruption in nptl/tst-sem6.

Torvald Riegel triegel@redhat.com
Fri Dec 5 18:53:00 GMT 2014


This makes the nptl/tst-sem6 interrupt sem_wait reliably by letting the
signal handler call sem_post.  This ensures that if the signal handler
should happen to run before sem_wait actually starts, sem_wait will find
an available token and return.  This is necessary if a program does not
want to rely on timing nor on forward progress / fairness guarantees of
the OS scheduler.

It's needed so that Patch 3/3 can do the right thing in face of a
FUTEX_WAIT that may return EINTR on either signal interruption or
spuriously.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sem-test1.patch
Type: text/x-patch
Size: 1389 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141205/4774c2a4/attachment.bin>


More information about the Libc-alpha mailing list