From patchwork Mon May 23 15:09:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9132053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A391E607D5 for ; Mon, 23 May 2016 15:27:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A4322822F for ; Mon, 23 May 2016 15:27:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F46028239; Mon, 23 May 2016 15:27:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48A822822F for ; Mon, 23 May 2016 15:27:27 +0000 (UTC) Received: from localhost ([::1]:48885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rlO-0000OQ-Dv for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 May 2016 11:27:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUk-0002AX-R5 for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4rUb-0003yt-LD for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:14 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUb-0003yp-E1 for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:05 -0400 Received: by mail-wm0-x243.google.com with SMTP id n129so16050712wmn.1 for ; Mon, 23 May 2016 08:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=jQAGCEz+VrxLbXZ3YYKLy/nbFEQX4AzPOoz0HOVedr4=; b=xVlMe5FaE1x1ha2rQfPSRO2+alfFIUtbIsG0Tbag+K2cyewAYMX4JcYowDlzFmmDNq KBvXnbpF7XvV5Wj2UQmCZacXcWRjSFBvkmZkGCfv4D0eBfaen0ep+uR1FGeFHSBCLDE9 12TWYkHssuKW0mHMROmfdpuQAdmFiy/2rVYxVX1YCf2zBh5G/8ubIQRmrrBI4nV/DofO tTMGinnwLUx4hVN5s1c/NLAGPM6pVumWNChZjkYBWrZZr0ho8CtPTCQxYOeAicqWzGie 8OVX1BHwn5a3A3yGhF98lP3QJwf+gTrEw2Is1/qhzL09RC3He48gZJ8Q69NRM4ecigzd WNaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=jQAGCEz+VrxLbXZ3YYKLy/nbFEQX4AzPOoz0HOVedr4=; b=jnrABhcTvzgX3761DZ6K/wfr6Sd4GtuyWNzUYlQd28j0IVlJgCs/5mWwif7y2Qx0CE +WqnOpJkjal8x1+55JS490cHuUlIpG33ey07J6WVVabnkLTt5AnfLro2fCUu28K2PG0N LmdvOSIUzgw3Kz1z0b7DtIskWgGlnvFt2Un/UylTVmVgtg7fyZXwtYZTAn49oYnjvtpm jfLhOdjxuYs27d7ykFRt3MueOUiwsDqZaDhvhAvLO2AeglEw78Q1VnhfUaXlvsk98XvB QgKCOsO2i9/xPAnaPWJgKxl/Y1GIuFtsAmIdS+gyDdcrPq79ju0xr9zDAR76sO2S3f39 8kjw== X-Gm-Message-State: AOPr4FUxAJFXiPPxmam2ZBrE9iK8/3P6kHw7svtb9ybmK8aA7hjfJym7PWwnD15k+US/yw== X-Received: by 10.28.132.68 with SMTP id g65mr18229861wmd.91.1464016204814; Mon, 23 May 2016 08:10:04 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id ac2sm19250359wjc.35.2016.05.23.08.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 08:10:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 23 May 2016 17:09:37 +0200 Message-Id: <1464016199-43768-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> References: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PULL 02/24] docs/atomics.txt: Update pointer to linux macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pranith Kumar Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Pranith Kumar Add a missing end brace and update doc to point to the latest access macro. ACCESS_ONCE() is deprecated. Signed-off-by: Pranith Kumar Message-Id: <1462198852-28694-1-git-send-email-bobby.prani@gmail.com> Signed-off-by: Paolo Bonzini --- docs/atomics.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/atomics.txt b/docs/atomics.txt index ef285e3..bba771e 100644 --- a/docs/atomics.txt +++ b/docs/atomics.txt @@ -62,7 +62,7 @@ operations: typeof(*ptr) atomic_fetch_sub(ptr, val) typeof(*ptr) atomic_fetch_and(ptr, val) typeof(*ptr) atomic_fetch_or(ptr, val) - typeof(*ptr) atomic_xchg(ptr, val + typeof(*ptr) atomic_xchg(ptr, val) typeof(*ptr) atomic_cmpxchg(ptr, old, new) all of which return the old value of *ptr. These operations are @@ -328,7 +328,7 @@ and memory barriers, and the equivalents in QEMU: - atomic_read and atomic_set in Linux give no guarantee at all; atomic_read and atomic_set in QEMU include a compiler barrier - (similar to the ACCESS_ONCE macro in Linux). + (similar to the READ_ONCE/WRITE_ONCE macros in Linux). - most atomic read-modify-write operations in Linux return void; in QEMU, all of them return the old value of the variable.