ipc.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-05-10 19:55:18 +02:00 committed by Michael Kerrisk
parent 0d961e8818
commit acb2e04c24
1 changed files with 11 additions and 7 deletions

View File

@ -27,12 +27,20 @@
ipc \- System V IPC system calls ipc \- System V IPC system calls
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.BI "int ipc(unsigned int " call ", int " first ", unsigned long " second , .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.BI " unsigned long " third ", void *" ptr ", long " fifth ); .B #include <unistd.h>
.PP
.BI "int syscall(SYS_ipc, unsigned int " call ", int " first ,
.BI " unsigned long " second ", unsigned long " third \
", void *" ptr ,
.BI " long " fifth );
.fi .fi
.PP .PP
.IR Note : .IR Note :
There is no glibc wrapper for this system call; see NOTES. glibc provides no wrapper for
.BR ipc (),
necessitating the use of
.BR syscall (2).
.SH DESCRIPTION .SH DESCRIPTION
.BR ipc () .BR ipc ()
is a common kernel entry point for the System\ V IPC calls is a common kernel entry point for the System\ V IPC calls
@ -56,10 +64,6 @@ system call; instead,
.BR semctl (2), .BR semctl (2),
.BR shmctl (2), .BR shmctl (2),
and so on really are implemented as separate system calls. and so on really are implemented as separate system calls.
.PP
Glibc does not provide a wrapper for this system call;
in the unlikely event that you want to call it directly, you can do so using
.BR syscall (2).
.SH SEE ALSO .SH SEE ALSO
.BR msgctl (2), .BR msgctl (2),
.BR msgget (2), .BR msgget (2),