Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Revert "Make sure futex waits never return ERESTART."



details:   https://anonhg.NetBSD.org/src/rev/6eb5776bf409
branches:  trunk
changeset: 971821:6eb5776bf409
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue May 05 15:23:32 2020 +0000

description:
Revert "Make sure futex waits never return ERESTART."

Part of redoing the timedwaitclock changes, which were buggy and
committed a little too fast.

diffstat:

 sys/kern/sys_futex.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (36 lines):

diff -r 7bc45696bee6 -r 6eb5776bf409 sys/kern/sys_futex.c
--- a/sys/kern/sys_futex.c      Tue May 05 12:47:16 2020 +0000
+++ b/sys/kern/sys_futex.c      Tue May 05 15:23:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_futex.c,v 1.9 2020/05/03 01:26:39 riastradh Exp $  */
+/*     $NetBSD: sys_futex.c,v 1.10 2020/05/05 15:23:32 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2018, 2019, 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.9 2020/05/03 01:26:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.10 2020/05/05 15:23:32 riastradh Exp $");
 
 /*
  * Futexes
@@ -954,16 +954,12 @@
         * If we were woken up, the waker will have removed fw from the
         * queue.  But if anything went wrong, we must remove fw from
         * the queue ourselves.  While here, convert EWOULDBLOCK to
-        * ETIMEDOUT in case cv_timedwait_sig returned EWOULDBLOCK, and
-        * convert ERESTART to EINTR so that we don't restart with the
-        * same relative timeout after time has elapsed.
+        * ETIMEDOUT.
         */
        if (error) {
                futex_wait_abort(fw);
                if (error == EWOULDBLOCK)
                        error = ETIMEDOUT;
-               else if (error == ERESTART)
-                       error = EINTR;
        }
 
        mutex_exit(&fw->fw_lock);



Home | Main Index | Thread Index | Old Index