Skip to contentSkip to conversation

membarrier.2: Update prototype

PATCH In review Alejandro Colomar 3 participants 4 messages Nov 1, 2020 – Nov 2, 2020 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 membarrier.2: Update prototype

The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'. These changes were introduced to the kernel
in commit 2a36ab717e8fe678d98f81c14a0b124712719840.

---
 man2/membarrier.2 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
man2/membarrier.2 +8 -1
index 24a24ba86..42b7e2acc 100644
@@ -23,6 +23,13 @@
 .\" %%%LICENSE_END
 .\"
 .TH MEMBARRIER 2 2020-06-09 "Linux" "Linux Programmer's Manual"
+.\" FIXME:
+.\" The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'.
+.\" These changes were introduced to the kernel
+.\" in commit 2a36ab717e8fe678d98f81c14a0b124712719840.
+.\" The prototype has been updated,
+.\" but the new features have not yet been documented.
+.\" TODO: Document those new features.
 .SH NAME
 membarrier \- issue memory barriers on a set of threads
 .SH SYNOPSIS
@@ -30,7 +37,7 @@ membarrier \- issue memory barriers on a set of threads
 .PP
 .B #include <linux/membarrier.h>
 .PP
-.BI "int membarrier(int " cmd ", int " flags ");"
+.BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id );
 .fi
 .PP
 .IR Note :
Signature · 1 line
2.28.0
#1 lore raw
Quoted 3 lines · ----- On Nov 1, 2020, at 3:04 PM, Alejandro Colomar [email protected]…

The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'. These changes were introduced to the kernel
in commit 2a36ab717e8fe678d98f81c14a0b124712719840.

I doubt the proposed patch with a FIXME and a TODO is appropriate for the man pages project. It does point out the fact that the membarrier man page needs updating following Peter's commit though.

Peter (Oskolkov), can you contribute a patch detailing the new membarrier flags and cpu_id arguments to the man pages project ?

Thanks,

Mathieu

Quoted 35 lines

---
man2/membarrier.2 | 9 ++++++++-

1 file changed, 8 insertions(+), 1 deletion(-)
man2/membarrier.2 +0 -0
index 24a24ba86..42b7e2acc 100644
@@ -23,6 +23,13 @@

.\" %%%LICENSE_END
.\"
.TH MEMBARRIER 2 2020-06-09 "Linux" "Linux Programmer's Manual" +.\" FIXME:
+.\" The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'. +.\" These changes were introduced to the kernel
+.\" in commit 2a36ab717e8fe678d98f81c14a0b124712719840.
+.\" The prototype has been updated,
+.\" but the new features have not yet been documented.
+.\" TODO: Document those new features.
.SH NAME
membarrier \- issue memory barriers on a set of threads
.SH SYNOPSIS

man2/membarrier.2 +0 -0
@@ -30,7 +37,7 @@ membarrier \- issue memory barriers on a set of threads

.PP
.B #include <linux/membarrier.h>
.PP
-.BI "int membarrier(int " cmd ", int " flags ");"
+.BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id ); .fi
.PP
.IR Note :
--
2.28.0

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
#2 lore raw
Quoted 9 lines · Mathieu Desnoyers
Quoted 3 lines · ----- On Nov 1, 2020, at 3:04 PM, Alejandro Colomar [email protected]…

The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'. These changes were introduced to the kernel
in commit 2a36ab717e8fe678d98f81c14a0b124712719840.

I doubt the proposed patch with a FIXME and a TODO is appropriate for the man pages project. It does point out the fact that the membarrier man page needs updating following Peter's commit though.

Hi Mathieu,

Agree; I didn't intend this to be directly applied, but to attract the attention of someone who knows the details, and hopefully fix the whole issue at once :)

Thanks,

Alex

Quoted 44 lines

Peter (Oskolkov), can you contribute a patch detailing the new membarrier flags and cpu_id arguments to the man pages project ?

Thanks,

Mathieu

Quoted 35 lines

---
man2/membarrier.2 | 9 ++++++++-

1 file changed, 8 insertions(+), 1 deletion(-)
man2/membarrier.2 +0 -0
index 24a24ba86..42b7e2acc 100644
@@ -23,6 +23,13 @@

.\" %%%LICENSE_END
.\"
.TH MEMBARRIER 2 2020-06-09 "Linux" "Linux Programmer's Manual" +.\" FIXME:
+.\" The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'. +.\" These changes were introduced to the kernel
+.\" in commit 2a36ab717e8fe678d98f81c14a0b124712719840.
+.\" The prototype has been updated,
+.\" but the new features have not yet been documented.
+.\" TODO: Document those new features.
.SH NAME
membarrier \- issue memory barriers on a set of threads
.SH SYNOPSIS

man2/membarrier.2 +0 -0
@@ -30,7 +37,7 @@ membarrier \- issue memory barriers on a set of threads

.PP
.B #include <linux/membarrier.h>
.PP
-.BI "int membarrier(int " cmd ", int " flags ");"
+.BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id ); .fi
.PP
.IR Note :
--
2.28.0

#3 lore raw
In reply to Mathieu Desnoyers
Quoted 7 lines · Mathieu Desnoyers
Quoted 3 lines · ----- On Nov 1, 2020, at 3:04 PM, Alejandro Colomar [email protected]…

The Linux kernel now uses 'flags' and added a new argument: 'cpu_id'. These changes were introduced to the kernel
in commit 2a36ab717e8fe678d98f81c14a0b124712719840.

[...]

Quoted 2 lines

Peter (Oskolkov), can you contribute a patch detailing the new membarrier flags and cpu_id arguments to the man pages project ?

Yes, sure, I'll prepare a patch in the next day or two.

Thanks,
Peter

[...]