Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751480AbdISSQW (ORCPT ); Tue, 19 Sep 2017 14:16:22 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35259 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbdISSQU (ORCPT ); Tue, 19 Sep 2017 14:16:20 -0400 X-Google-Smtp-Source: AOwi7QD81cpWfWdWrsozpc9Mtfu9/oqFF6MdL8sXj4tVouFBdKcKXS2EyPnnhd51TsYegbbiPtOZ+g== From: Scott Tsai To: paulmck@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, Scott Tsai Subject: [PATCH] memory-barriers.txt: Fix typo in pairing example Date: Wed, 20 Sep 2017 02:16:00 +0800 Message-Id: <20170919181600.4839-1-scottt@scottt.tw> X-Mailer: git-send-email 2.13.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the "general barrier pairing with implicit control depdendency" example, the last write by CPU 1 was meant to change variable x and not y. The example would be pretty uninteresting if no CPU ever changes x and the variable was initialized to zero. Signed-off-by: Scott Tsai --- Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index b759a60624fd..468894a705a9 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt @@ -968,7 +968,7 @@ Or even: =============== =============================== r1 = READ_ONCE(y); - WRITE_ONCE(y, 1); if (r2 = READ_ONCE(x)) { + WRITE_ONCE(x, 1); if (r2 = READ_ONCE(x)) { WRITE_ONCE(y, 1); } -- 2.13.5