sem_wait and EINTR

Submitted by Orivej Desh on Dec. 6, 2018, 8:31 p.m.

Details

Message ID 20181206203111.3fbb2067@orivej.orivej.org
State New
Series "sem_wait and EINTR"
Headers show

Commit Message

Orivej Desh Dec. 6, 2018, 8:31 p.m.
* Markus Wichmann <nullplan@gmx.net> [2018-12-06]
> Hi all,
> 
> is the attached patch acceptable? A word about the bitfields: I
> generally dislike them for most things, but I didn't want to destroy the
> alignment struct __libc had going on, and these other flags really only
> are 0 or 1.
> 
> Patch is untested for want of an old kernel.

Thank you! I have checked that your patch works as intended.
I have emulated an old kernel with this:

Patch hide | download patch | download mbox

--- a/src/thread/__timedwait.c
+++ b/src/thread/__timedwait.c
@@ -28 +28 @@  int __timedwait_cp(volatile int *addr, int val,
-	r = -__syscall_cp(SYS_futex, addr, FUTEX_WAIT|priv, val, top);
+	r = EINTR;