public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>,
	Peter Oskolkov <posk@google.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Alejandro Colomar <colomar.6.4.3@gmail.com>,
	linux-man@vger.kernel.org,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Boqun Feng <boqun.feng@gmail.com>, Paul Turner <pjt@google.com>,
	Chris Kennelly <ckennelly@google.com>,
	Peter Oskolkov <posk@posk.io>
Subject: [PATCH 2/1] membarrier.2: Update EXAMPLES for new membarrier() API
Date: Tue,  3 Nov 2020 22:13:34 +0100	[thread overview]
Message-ID: <20201103211333.11826-1-colomar.6.4.3@gmail.com> (raw)
In-Reply-To: <042cd0b4-236f-ceca-2760-9a4fbbcd3e3f@gmail.com>

Fix the EXAMPLES tu use the new interface for the syscall membarrier().
See the previous commit, by Peter Oskolkov.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---

Hi Peter,

I wrote this patch for the EXAMPLES Section to complete yours.

Cheers,

Alex

 man2/membarrier.2 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/man2/membarrier.2 b/man2/membarrier.2
index c95e97cb6..0251f1477 100644
--- a/man2/membarrier.2
+++ b/man2/membarrier.2
@@ -387,9 +387,9 @@ becomes:
 static volatile int a, b;
 
 static int
-membarrier(int cmd, int flags)
+membarrier(int cmd, unsigned int flags, int cpu_id)
 {
-    return syscall(__NR_membarrier, cmd, flags);
+    return syscall(__NR_membarrier, cmd, flags, cpu_id);
 }
 
 static int
@@ -399,7 +399,7 @@ init_membarrier(void)
 
     /* Check that membarrier() is supported. */
 
-    ret = membarrier(MEMBARRIER_CMD_QUERY, 0);
+    ret = membarrier(MEMBARRIER_CMD_QUERY, 0, 0);
     if (ret < 0) {
         perror("membarrier");
         return \-1;
@@ -426,7 +426,7 @@ static void
 slow_path(int *read_a)
 {
     b = 1;
-    membarrier(MEMBARRIER_CMD_GLOBAL, 0);
+    membarrier(MEMBARRIER_CMD_GLOBAL, 0, 0);
     *read_a = a;
 }
 
-- 
2.28.0


  reply	other threads:[~2020-11-03 21:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 19:04 [PATCH] membarrier.2: Update membarrier manpage for 5.10 Peter Oskolkov
2020-11-03 21:01 ` Alejandro Colomar
2020-11-03 21:13   ` Alejandro Colomar [this message]
2020-11-04  9:39   ` Alejandro Colomar
2020-11-04 16:01     ` Peter Oskolkov
2020-11-04 16:29       ` [PATCH v3] membarrier.2: Update membarrier manual page " Alejandro Colomar
2020-11-04 16:42         ` Peter Oskolkov
2020-11-04 22:04           ` Alejandro Colomar
2020-11-05 11:32       ` [PATCH v4] " Alejandro Colomar
2020-11-05 12:04         ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201103211333.11826-1-colomar.6.4.3@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=ckennelly@google.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mtk.manpages@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=posk@google.com \
    --cc=posk@posk.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox