Skip to contentSkip to conversation

man/man2/get_mempolicy.2: nodemask param is a pointer

PATCH In review Joe Konno 3 participants 4 messages Mar 20, 2025 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Joe Konno

author
#0 lore raw

PATCH 1/1 man/man2/get_mempolicy.2: nodemask param is a pointer

Checked, and nodemask parameter for this syscall has been a pointer since v2.6.7 (near as I can tell).

Fixes 77f31ff920bc ("get_mempolicy.2, mbind.2: SYNOPSIS: Use VLA syntax in function parameters")
---
 man/man2/get_mempolicy.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/get_mempolicy.2 +1 -1
index 526acc0c9a17..d6a8eca9564b 100644
@@ -18,7 +18,7 @@ NUMA (Non-Uniform Memory Access) policy library
 .nf
 .P
 .BI "long get_mempolicy(int *" mode ,
-.BI "                   unsigned long " nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
+.BI "                   unsigned long *" nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
 .B "                                          / ULONG_WIDTH],"
 .BI "                   unsigned long " maxnode ", void *" addr ,
 .BI "                   unsigned long " flags );
Signature · 1 line
2.49.0
#1 lore raw

Hi Joe,

Quoted 2 lines · Joe Konno

Checked, and nodemask parameter for this syscall has been a pointer since v2.6.7 (near as I can tell).

It is currently documented as such.

unsigned long nodemask[(.maxnode + ULONG_WIDTH - 1) / ULONG_WIDTH],

It is an array parameter, and array parameters are adjusted to pointers.

Have a lovely day!
Alex

Quoted 23 lines
Fixes 77f31ff920bc ("get_mempolicy.2, mbind.2: SYNOPSIS: Use VLA syntax in function parameters")
---
 man/man2/get_mempolicy.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/get_mempolicy.2 +1 -1
index 526acc0c9a17..d6a8eca9564b 100644
@@ -18,7 +18,7 @@ NUMA (Non-Uniform Memory Access) policy library
 .nf
 .P
 .BI "long get_mempolicy(int *" mode ,
-.BI "                   unsigned long " nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
+.BI "                   unsigned long *" nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
 .B "                                          / ULONG_WIDTH],"
 .BI "                   unsigned long " maxnode ", void *" addr ,
 .BI "                   unsigned long " flags );
Signature · 1 line
2.49.0
Signature · 1 line
<https://www.alejandro-colomar.es/>
#2 lore raw

Derp. I can't blame Monday for this one. ^_^ Apologies for the noise.

Quoted 40 lines · Alejandro Colomar

Hi Joe,

Quoted 2 lines · Joe Konno

Checked, and nodemask parameter for this syscall has been a pointer since v2.6.7 (near as I can tell).

It is currently documented as such.

unsigned long nodemask[(.maxnode + ULONG_WIDTH - 1) / ULONG_WIDTH],

It is an array parameter, and array parameters are adjusted to pointers.

Have a lovely day!
Alex

Quoted 23 lines
Fixes 77f31ff920bc ("get_mempolicy.2, mbind.2: SYNOPSIS: Use VLA syntax in function parameters")
---
  man/man2/get_mempolicy.2 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/get_mempolicy.2 +1 -1
index 526acc0c9a17..d6a8eca9564b 100644
@@ -18,7 +18,7 @@ NUMA (Non-Uniform Memory Access) policy library
  .nf
  .P
  .BI "long get_mempolicy(int *" mode ,
-.BI "                   unsigned long " nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
+.BI "                   unsigned long *" nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
  .B "                                          / ULONG_WIDTH],"
  .BI "                   unsigned long " maxnode ", void *" addr ,
  .BI "                   unsigned long " flags );
Signature · 1 line
2.49.0
#3 lore raw

Hi Joe,

Quoted 1 line · Joe Konno

Derp. I can't blame Monday for this one. ^_^ Apologies for the noise.

No problem. :)

Cheers,
Alex

Quoted 44 lines · Alejandro Colomar
Quoted 40 lines

Hi Joe,

Quoted 2 lines · Joe Konno

Checked, and nodemask parameter for this syscall has been a pointer since v2.6.7 (near as I can tell).

It is currently documented as such.

unsigned long nodemask[(.maxnode + ULONG_WIDTH - 1) / ULONG_WIDTH],

It is an array parameter, and array parameters are adjusted to pointers.

Have a lovely day!
Alex

Quoted 23 lines
Fixes 77f31ff920bc ("get_mempolicy.2, mbind.2: SYNOPSIS: Use VLA syntax in function parameters")
---
  man/man2/get_mempolicy.2 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/get_mempolicy.2 +1 -1
index 526acc0c9a17..d6a8eca9564b 100644
@@ -18,7 +18,7 @@ NUMA (Non-Uniform Memory Access) policy library
  .nf
  .P
  .BI "long get_mempolicy(int *" mode ,
-.BI "                   unsigned long " nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
+.BI "                   unsigned long *" nodemask [(. maxnode " + ULONG_WIDTH \- 1)"
  .B "                                          / ULONG_WIDTH],"
  .BI "                   unsigned long " maxnode ", void *" addr ,
  .BI "                   unsigned long " flags );
Signature · 1 line
2.49.0
Signature · 1 line
<https://www.alejandro-colomar.es/>