From patchwork Thu Aug 25 13:44:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9299401 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 4FA8B60459 for ; Thu, 25 Aug 2016 13:51:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 419272933E for ; Thu, 25 Aug 2016 13:51:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3624E29341; Thu, 25 Aug 2016 13:51:25 +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=BAD_ENC_HEADER,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 9AA002933E for ; Thu, 25 Aug 2016 13:51:24 +0000 (UTC) Received: from localhost ([::1]:56378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcv3z-0000bQ-OE for patchwork-qemu-devel@patchwork.kernel.org; Thu, 25 Aug 2016 09:51:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcuyc-0004Ms-R8 for qemu-devel@nongnu.org; Thu, 25 Aug 2016 09:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcuyY-0002GJ-UI for qemu-devel@nongnu.org; Thu, 25 Aug 2016 09:45:50 -0400 Received: from mail-db5eur01on0101.outbound.protection.outlook.com ([104.47.2.101]:42816 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcuyR-0002Bq-RS; Thu, 25 Aug 2016 09:45:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YrwKJ7iDwlLYgtsWO+W1FM3jq3mB2sYmnS5B7tbK2V4=; b=h7SC6DZ6v7lRSZ20MhSPB/AkVW9fzZd2x4H0y5jFY+bYcX7eFpZinSraAWZ0Kd3vcGfxN/qbDMLkpAF5g8TEp9QEaXcPQvMrn+WDrK8/IsgA+yVZLZh0sfTH3i3prGiXnyhSQAlkETAwhKi7JlEOvR9FYgH/LLJS5p40+Bn69gY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=pbutsykin@virtuozzo.com; Received: from pavelb-Z68P-DS3.sw.ru (195.214.232.10) by DB6PR0802MB2549.eurprd08.prod.outlook.com (10.172.251.147) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.9; Thu, 25 Aug 2016 13:45:37 +0000 From: Pavel Butsykin To: , Date: Thu, 25 Aug 2016 16:44:10 +0300 Message-ID: <20160825134421.20231-12-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160825134421.20231-1-pbutsykin@virtuozzo.com> References: <20160825134421.20231-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: AMSPR02CA0013.eurprd02.prod.outlook.com (10.242.225.141) To DB6PR0802MB2549.eurprd08.prod.outlook.com (10.172.251.147) X-MS-Office365-Filtering-Correlation-Id: 10c39904-950e-45a4-41b3-08d3ccee190d X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2549; 2:SH3VAOFUaxh4Y/iA8T0f2+pxx6OuUEoLgXqPkdkvKHLVCT3Smn/kLGiNI0F6k7mq8slLFl1weH4lWa+HjaNntomvgqy3htKjxm5pBaQNutEuwNl+GyAAGoQla4nIwOM438sJ2pHOOWkhdeLD6JQd98OR4f4lyO78BRgnfO/BE+fsICLzJYGB8WTK1N1UqVs7; 3:w1Jnh7vQIDCQ5hVeNmyToWgQGSYgTcLGGx3aUWrCmSYtIbI0d+tLxS/dlM8xPou9iLp0UrJPsTx9VeVadtM8al3uSkFJHMyPqnbkDQdW+sxhcQJrocJsq8en5+AnLpR8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2549; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2549; 25:kz70ES1QLhp901fCaIlHXFziNKNNd1x45eiaDWhiZlsUjoOBk8EdtCATTOIXv4BUo/cdkhAZd9rKJD5xCCnLG5ue28mKt9x5Yn4ZxDDPD19jl98F0XRCnQHeoOVDRyjwHco4zTZEYKr4xFOlw3a6KuEYhul7uqdWmHL/cq9hkfBTzHTw6Tq7INDr+oo3PrlouPakjgDXPhrB5nN9GOn3fvYWUo4iKWB8yC+RSexxIeJIQSafAK/rLcqWQhZrFOlJvlbHv73D0L99zUtoR6Kid7hntohN1uW6WXO68jaEwrUkKpd6Jdt4fZ2vsAM4LkwS/PzKi+MmNggBVVltWhyzrpqcePrydtWWMm5b7veilr0YGYF/WpjquiZbuzr07ymjUN4irEkxYxREbX1sftN8Np9JTgEgJz3+71fwrLM7rgmX1q+GCiK8KkZDrKj87C6tee7NF2qbjroHbmEVleeHz40wHZD5oW2m1nEVCToKr4XhFTTD88WNMwaUkme1tc80t4mYt9vxuAoGXPywXBFsher1mD880OFYqtW4kbp1XUWqE8uHszpWUD9eQGqdtGrNm0qTnJRShGROq1PCfRcnqkWSo4bXLDtpddA1/LA1BgMg4WElwK6rg9nDYhHQtdKzInlScoQ05Dh9ObKg0H843zRtfe/ZqhD0wtws2WpNSY3C+m1/FuUx10Jq02wwkytL; 31:RMg4gUAgXOh1GVuFL6vQ+g5xl2RuuLWU9RGJi2AKGUDePw/1fladW7I6DBMopC8f6a6fY22qZ0Y1yVBD8G+Fja9MfbxnDGd8jSGn0erdTlF/0mGVtZL0BTD8kt5gRWz4b0hug8AGCd89E2PMCNTqwzBngCemhTlweAuhUJJw09x1JfjTzPvgVHbvnRZ+1+b7qI6CMTJusQYXXUN5FSC+D/vSCcjW9XtbaHzfOxZ4f9g= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6043046)(6042046); SRVR:DB6PR0802MB2549; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0802MB2549; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2549; 4:toyftMCQfjOlvG2Rgy60mlLUz8AJY8ZwbD4p+fu/sLfFVl6gbO6gDj22LjE2jcEUuF8hlznJvw4gzXLuBwOLAiNQ/YrRrRx+bdBhiO6m0/lqOanWpzuwKn/N1MtBieC5XRAp2iYhvAHLjeMh3IPjyiXaZkoQgl1y2w7gkKyLtBfFNFqR3Z91by+yxjM/c2cvfS/HEkCtO6iZGR7DSF6YRwTj55D1y7BdY6zYiTf5hj2SReenvRLZnqXs9CsSc9hT3UrcWzcGto4uVPeztRgHcb+uf1+Wo11dtcX2wERyM373rnf2+zW3qLQv024L3E6ZGwjINVKUZfXd157SRU2H51lxDFTJRJye2LhTej+EBE5DQnF04YPxR4DV0+aSsAaN+/iJKSRO3uVECPGEXnZiDr3CTDIDi0o9+7uyRxDwemk= X-Forefront-PRVS: 0045236D47 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(86362001)(33646002)(1076002)(69596002)(5003940100001)(42186005)(68736007)(189998001)(92566002)(66066001)(106356001)(47776003)(6116002)(3846002)(586003)(36756003)(5001770100001)(97736004)(2906002)(4326007)(2950100001)(5660300001)(76176999)(48376002)(53416004)(105586002)(50466002)(81156014)(8676002)(50226002)(77096005)(81166006)(19580405001)(50986999)(229853001)(101416001)(7846002)(7736002)(305945005)(19580395003)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0802MB2549; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0802MB2549; 23:t0dKW1lvsYVHiycmhJUujbj/BvN2UC0qeG3G0+i?= =?us-ascii?Q?adVAZQk8rIUSZeatLtG0MqDUjbJpLV7WIHf9sjYS3/yb/tIJumbt7FK19Zsx?= =?us-ascii?Q?jWu8qA/vQVidtkkZBjU6XHpccafau2CDfos7faTlrs4OMyzmutPCIMJ4/bRT?= =?us-ascii?Q?A/v+Ap3DKMYH2LsqAbYC0hWJUQhQJjvSykDQx452B3GuxI37d/P+k23Jpeq3?= =?us-ascii?Q?9aF/u3H3T2wGTzw0aogMhoTfxGtgorQYZuZZfk7EZ72y8q+anyoFVXCQq3RH?= =?us-ascii?Q?vt49fq4Obt4y7MdJga0S9JJKFZZ6o5z7FbOMHxE6FZ2+v/nyPLoaQSP+elYo?= =?us-ascii?Q?3zakx1EslZJEjFmO6TGLINawFBflVGX7toE4Pr4la4FgoJI8nPoukPP5o8oY?= =?us-ascii?Q?OZ1KAtJXFi6g6DTAYpaUo8pCaQ2sVkJNpMVGJfE5HiFgqAqmyevYyIXjqEtB?= =?us-ascii?Q?JxBhSkk3JvSF6UB1XFrf3lZohzW/OMqdZ0cqVWqgtGP5sJoCpAkuwfMGp1EU?= =?us-ascii?Q?1m36B2FkFCGWnJ3eiACcrtohhJ/PFuFR0kpkEG4jgAw1SuKpTFYgvEMp5QSf?=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8bG+WMwljIeX37WgOVg1jMEtP7aCb3Z3p7NymxUe; 5:b3agaGDxZvilh+nTCZ1PAwBPNGP8bi0Ksi8Cc0Wc5n6qd+SQBHdY3QV/5qrKzz6XimG2Sl4zw7foO4Lte8+7e2NTIVLGwesrji9d86vMzkBwmUW43ORkuVI/AoUNS0p5921eVoaYoNKqVkf0DlwiMg==; 24:FiAv/M001EGLSeSLxz3fc5vCBIv6lYHJl+oXbV8gLt97UTNMFKS06S+GUScy3vTknKyKKJNck/z9XDSLqgugUBN43tN9YQ16iSDCgCD5k+E=; 7:spqKnAHuslhvb8L3kY3vZsp1s+12E1/WlwEqv6AL2oqCra7NYs5JZbzyxA9qUONSxjzw51CFUpQcuJBXxovZHcUVs8tppsC2Mzblt5tzhClN1xRPvWgfoJEJZLfPTvhbXNpKFfWyD8Ou8WYhVp2LZopaj1B632U9A3E+VWEhR6ba26MqoRlk5d09WbAOn6sJ6ka75NoMVVHTGQOk0dSb58JkERfmlyMNTVYxyTs4pcqfs0aXXYSFg0RNPLKEXSYj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2549; 20:5SLtrftL+xBciebcBBBtWD3fYuIXcmdKIK+ko26r5o/wCfnI6a0AijhnSO+TBDhGBCa1uv97VjiqacliY/nLk/pdj2shcGQezjOq4D9QCNx3M+S55h38rybkx/S0W+X/L59wpVGfJ/bnNAB7d8aK9L3vHyxx9X2eVlBIe9b2TrM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2016 13:45:37.7048 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2549 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.101 Subject: [Qemu-devel] [PATCH RFC 11/22] add QEMU style defines for __sync_add_and_fetch 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: kwolf@redhat.com, den@openvz.org, jsnow@redhat.com, stefanha@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pavel Butsykin --- include/qemu/atomic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 7e13fca..acf8f68 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -152,6 +152,9 @@ _old; \ }) +#define atomic_inc_fetch(ptr) __sync_add_and_fetch(ptr, 1) +#define atomic_dec_fetch(ptr) __sync_add_and_fetch(ptr, -1) + /* Provide shorter names for GCC atomic builtins, return old value */ #define atomic_fetch_inc(ptr) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST) #define atomic_fetch_dec(ptr) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)