Skip to contentSkip to conversation

cacheflush.2: Update SYNOPSIS for glibc wrapper

PATCH In review Alejandro Colomar 2 participants 4 messages Jan 16, 2021 – Jan 17, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cacheflush.2: Update SYNOPSIS for glibc wrapper

Glibc uses 'void *' instead of 'char *'.
And the prototype is declared in <sys/cacheflush.h>.

......

$ syscall='cacheflush';
$ ret='int';
$ find glibc/ -type f -name '*.h' \
  |xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;";
glibc/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h:27:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/mips/sys/cachectl.h:35:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/arc/sys/cachectl.h:30:
extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/csky/sys/cachectl.h:30:
extern int cacheflush (void *__addr, const int __nbytes,
		       const int __op) __THROW;
---
 man2/cacheflush.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man2/cacheflush.2 +2 -2
index 2cf624f3a..0496879ca 100644
@@ -27,9 +27,9 @@
 cacheflush \- flush contents of instruction and/or data cache
 .SH SYNOPSIS
 .nf
-.B #include <asm/cachectl.h>
+.B #inlcude <sys/cacheflush.h>
 .PP
-.BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
+.BI "int cacheflush(void *" addr ", int "nbytes ", int "cache );
 .fi
 .PP
 .IR Note :
Signature · 7 lines
2.30.0


_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#1 lore raw

Hi Alex,

Quoted 19 lines · Alejandro Colomar

Glibc uses 'void *' instead of 'char *'.
And the prototype is declared in <sys/cacheflush.h>.

......

$ syscall='cacheflush';
$ ret='int';
$ find glibc/ -type f -name '*.h' \
  |xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;";
glibc/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h:27:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/mips/sys/cachectl.h:35:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/arc/sys/cachectl.h:30:
extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW;
glibc/sysdeps/unix/sysv/linux/csky/sys/cachectl.h:30:
extern int cacheflush (void *__addr, const int __nbytes,
		       const int __op) __THROW;
Quoted 1 line

Thanks. Patch applied.

Cheers,

Michael

Quoted 21 lines
---
 man2/cacheflush.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man2/cacheflush.2 +2 -2
index 2cf624f3a..0496879ca 100644
@@ -27,9 +27,9 @@
 cacheflush \- flush contents of instruction and/or data cache
 .SH SYNOPSIS
 .nf
-.B #include <asm/cachectl.h>
+.B #inlcude <sys/cacheflush.h>
 .PP
-.BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
+.BI "int cacheflush(void *" addr ", int "nbytes ", int "cache );
 .fi
 .PP
 .IR Note :
Signature · 8 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#2 lore raw

Hi Michael,

Quoted 5 lines · Michael Kerrisk (man-pages)

Hi Alex,

Quoted 2 lines · Alejandro Colomar

Glibc uses 'void *' instead of 'char *'.
And the prototype is declared in <sys/cacheflush.h>.

D'oh!

Quoted 8 lines
Quoted 8 lines

......

$ syscall='cacheflush';
$ ret='int';
$ find glibc/ -type f -name '*.h' \
  |xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;";
glibc/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h:27:

It is defined in <sys/cachectl.h>

Please fix that.

Thanks,

Alex

Quoted 21 lines
Quoted 10 lines

extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; glibc/sysdeps/unix/sysv/linux/mips/sys/cachectl.h:35:
extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; glibc/sysdeps/unix/sysv/linux/arc/sys/cachectl.h:30:
extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW; glibc/sysdeps/unix/sysv/linux/csky/sys/cachectl.h:30:
extern int cacheflush (void *__addr, const int __nbytes,

		       const int __op) __THROW;

Thanks. Patch applied.

Cheers,

Michael

Quoted 4 lines
---
 man2/cacheflush.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 10 lines

man2/cacheflush.2 line 30

Quoted 10 lines
man2/cacheflush.2 +1 -1
index 2cf624f3a..0496879ca 100644
@@ -27,9 +27,9 @@
 cacheflush \- flush contents of instruction and/or data cache
 .SH SYNOPSIS
 .nf
-.B #include <asm/cachectl.h>
+.B #inlcude <sys/cacheflush.h>

s/cacheflush.h/cachectl.h/

Quoted 9 lines
Quoted 7 lines
man2/cacheflush.2 +1 -1
 .PP
-.BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
+.BI "int cacheflush(void *" addr ", int "nbytes ", int "cache );
 .fi
 .PP
 .IR Note :
Signature · 8 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#3 lore raw
Quoted 20 lines · Alejandro Colomar (man-pages)

Hi Michael,

Quoted 5 lines · Michael Kerrisk (man-pages)

Hi Alex,

Quoted 2 lines · Alejandro Colomar

Glibc uses 'void *' instead of 'char *'.
And the prototype is declared in <sys/cacheflush.h>.

D'oh!

Quoted 8 lines
Quoted 8 lines

......

$ syscall='cacheflush';
$ ret='int';
$ find glibc/ -type f -name '*.h' \
  |xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;";
glibc/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h:27:
Quoted 3 lines

It is defined in <sys/cachectl.h>

Please fix that.

Fixed! (Everything pushed now.)

Signature · 8 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc