From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V242d-0003Gn-GE for qemu-devel@nongnu.org; Wed, 24 Jul 2013 14:44:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V242Y-0007yr-JB for qemu-devel@nongnu.org; Wed, 24 Jul 2013 14:44:03 -0400 Received: from mail-ye0-x22d.google.com ([2607:f8b0:4002:c04::22d]:54152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V242Y-0007yg-EG for qemu-devel@nongnu.org; Wed, 24 Jul 2013 14:43:58 -0400 Received: by mail-ye0-f173.google.com with SMTP id m7so3001030yen.32 for ; Wed, 24 Jul 2013 11:43:58 -0700 (PDT) Sender: Richard Henderson Message-ID: <51F02069.8050301@twiddle.net> Date: Wed, 24 Jul 2013 08:43:53 -1000 From: Richard Henderson MIME-Version: 1.0 References: <1374649831-5656-1-git-send-email-riku.voipio@linaro.org> In-Reply-To: <1374649831-5656-1-git-send-email-riku.voipio@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] [PATCH] linux-user: implement m68k atomic syscalls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: riku.voipio@linaro.org Cc: qemu-devel@nongnu.org, Laurent Vivier On 07/23/2013 09:10 PM, riku.voipio@linaro.org wrote: > +#ifdef TARGET_NR_atomic_cmpxchg_32 > + case TARGET_NR_atomic_cmpxchg_32: > + { > + /* should use start_exclusive from main.c */ > + abi_ulong mem_value; > + if (get_user_u32(mem_value, arg6)) > + ret = -TARGET_EFAULT; > + if (mem_value == arg2) > + put_user_u32(arg1, arg6); > + ret = mem_value; > + break; > + } The ret = -TARGET_FAULT doesn't do anything useful without an associated break. The kernel queues the expected SIGSEGV for this sort of failure. Would that happen here? r~