From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68A8DC433B4 for ; Fri, 2 Apr 2021 15:10:10 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9B2960FEF for ; Fri, 2 Apr 2021 15:10:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9B2960FEF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lSLQv-0006iJ-OZ; Fri, 02 Apr 2021 11:10:01 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lSLQt-0006hV-D8 for kernelnewbies@kernelnewbies.org; Fri, 02 Apr 2021 11:09:59 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CB9EB5C00D9; Fri, 2 Apr 2021 11:09:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 02 Apr 2021 11:09:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=juEK9Sm9N7eHbizXMhMoPdMWTZ1 /3T4BUyAgpASv6KE=; b=KSW/q+bRxbAL20QCuJJYXeW/BlL3BbLp/9OJdwuNjIk U8zAOCsfwzOZRTDr1o+hW/v72kmMHxNHsuiaqDJtGT42+7PQ62Wk7HlBcQIx1bYV +odtkeaW0PKsNVRZjsXnObOh6r07h4konhttsC1ZDbxja8owDBQDL9vEGauJ9a4O G9kmTAeoyjN2ebwZi80J4PcvDDy1F1uui1BSf9ZLT04DDt34O7GDFR66tfLItIRw gRSwSGxhmvs6lWAaYiVgDbaP7hbxGaLyMqg4Jo21J7byJ/snXG9RY7Pcoc+jpyxV 6op1vbp2VJxguNZqNXWqDluuK5smuHsqyDXCbNMcmUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=juEK9S m9N7eHbizXMhMoPdMWTZ1/3T4BUyAgpASv6KE=; b=R/QjC9OCDKfZ6DhLsfvkBU D1SpjBC6uID2S+zavm1UR86SXTfRdd8PmdkKkNIlFDrzRUoWYqZAdN2rjXLHoNBD KaiGC0UNrpZBTyRZqohlw5VQUOSAbHBCjIbqBM8P86LPpTlCWy3WKDPffhVpc346 7469IN3CJRkQsH7PanS3Dhw9D457m1olApGQWFYNW5PH+uQrqkHV3r4sPjmQA0D2 Qt6sVyei+PEUNH4jCajDufOqFIJbF3fYQsmjWBP2fHs9gAve6sUgtZlgNNnOZgMd kKsSz4YeW1Qvywu9IrL3eZZ/xZ8PwLuYrOhrG1wsygSCG1NR6yl59yj7YZc+fCMA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeiiedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucfkphepkeef rdekiedrjeegrdeigeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 446D51080054; Fri, 2 Apr 2021 11:09:56 -0400 (EDT) Date: Fri, 2 Apr 2021 17:09:53 +0200 From: Greg KH To: Navin P Subject: Re: memory order seq cst for atomics Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Fri, Apr 02, 2021 at 08:15:12PM +0530, Navin P wrote: > Hi, > C11 and c++11 have memory order like memory_order_seq_cst .What is the > equivalent in Linux kernel ? > atomic64_inc(&var) ; > __SMP_mb(); Please read Documentation/memory-barriers.txt in the kernel source tree. It should answer all of your questions regarding this. good luck! greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies