Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/linux/common/Attic/linux_futex.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/linux/common/Attic/linux_futex.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.30 retrieving revision 1.30.6.1 diff -u -p -r1.30 -r1.30.6.1 --- src/sys/compat/linux/common/Attic/linux_futex.c 2013/04/17 14:39:40 1.30 +++ src/sys/compat/linux/common/Attic/linux_futex.c 2013/07/23 21:07:35 1.30.6.1 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_futex.c,v 1.30 2013/04/17 14:39:40 christos Exp $ */ +/* $NetBSD: linux_futex.c,v 1.30.6.1 2013/07/23 21:07:35 riastradh Exp $ */ /*- * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.30 2013/04/17 14:39:40 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.30.6.1 2013/07/23 21:07:35 riastradh Exp $"); #include #include @@ -195,6 +195,8 @@ linux_do_futex(struct lwp *l, const stru /*FALLTHROUGH*/ case LINUX_FUTEX_WAIT_BITSET: if ((error = ts2timo(clk, 0, ts, &tout, NULL)) != 0) { + if (error != ETIMEDOUT) + return error; /* * If the user process requests a non null timeout, * make sure we do not turn it into an infinite @@ -203,7 +205,7 @@ linux_do_futex(struct lwp *l, const stru * We use a minimal timeout of 1/hz. Maybe it would make * sense to just return ETIMEDOUT without sleeping. */ - if (error == ETIMEDOUT && SCARG(uap, timeout) != NULL) + if (SCARG(uap, timeout) != NULL) tout = 1; else tout = 0;