From patchwork Mon Mar 11 19:27:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 226652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4C0E02C02CB for ; Tue, 12 Mar 2013 06:30:11 +1100 (EST) Received: from localhost ([::1]:33765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF8QD-0002cj-GH for incoming@patchwork.ozlabs.org; Mon, 11 Mar 2013 15:30:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF8OB-0007nh-08 for qemu-devel@nongnu.org; Mon, 11 Mar 2013 15:28:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF8O0-00030v-Cw for qemu-devel@nongnu.org; Mon, 11 Mar 2013 15:28:02 -0400 Received: from afflict.kos.to ([92.243.29.197]:34972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF8O0-0002zI-6P for qemu-devel@nongnu.org; Mon, 11 Mar 2013 15:27:52 -0400 Received: from kos.to (a91-156-58-157.elisa-laajakaista.fi [91.156.58.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 0727326545 for ; Mon, 11 Mar 2013 20:27:49 +0100 (CET) Received: from voipio (uid 1000) (envelope-from voipio@kos.to) id 5e0dff by kos.to (DragonFly Mail Agent); Mon, 11 Mar 2013 21:27:49 +0200 From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 11 Mar 2013 21:27:40 +0200 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: John Rigby Subject: [Qemu-devel] [PATCH 03/11] linux-user/syscall.c: handle FUTEX_WAIT_BITSET in do_futex X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: John Rigby Upstream libc has recently changed to start using FUTEX_WAIT_BITSET instead of FUTEX_WAIT and this is causing do_futex to return -TARGET_ENOSYS. Pass bitset in val3 to sys_futex which will be ignored by kernel for the FUTEX_WAIT case. Signed-off-by: John Rigby Signed-off-by: Riku Voipio --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 19630ea..c7fcfc0 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4922,6 +4922,7 @@ static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, #endif switch (base_op) { case FUTEX_WAIT: + case FUTEX_WAIT_BITSET: if (timeout) { pts = &ts; target_to_host_timespec(pts, timeout); @@ -4929,7 +4930,7 @@ static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, pts = NULL; } return get_errno(sys_futex(g2h(uaddr), op, tswap32(val), - pts, NULL, 0)); + pts, NULL, val3)); case FUTEX_WAKE: return get_errno(sys_futex(g2h(uaddr), op, val, NULL, NULL, 0)); case FUTEX_FD: