shmsys(2) DG/UX 5.4.2 shmsys(2)
NAME
shmsys - perform a shared memory operation
SYNOPSIS
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int shmsys (P1, P2, P3, P4)
int P1;
int P2;
int P3;
int P4;
where:
P1 An integer indicating the type of operation to be performed
with shared memory (0 = SHMCTL, 1 = SHMGET, 2 = SHMAT, 3 =
SHMDT)
P2 In case of SHMCTL or SHMAT, P2 is a shared memory id. In case
of SHMGET, P2 is a shared memory key. In case of SHMDT, P2 is
a shared memory segment address.
P3 In case of SHMCTL, P3 is a control command. In case of
SHMGET, P3 is the shared memory segment size. In case of
SHMAT, P3 is the shared memory segment address.
P4 In case of SHMCTL, P4 is a pointer to a buffer, which contains
all the information about the shared memory segment. In case
of SHMGET and SHMAT, P4 is a flag.
DESCRIPTION
The shmsys system call performs a shared memory operation (SHMCTL,
SHMGET, SHMAT, SHMDT) indicated by the value of P1.
ACCESS CONTROL
See the descriptions of the exception condition EACCES in the man
pages for the shmget, shmctl, shmat, and shmdt system calls.
RETURN VALUE
shmid If SHMGET was successful.
shmaddr If SHMAT was successful.
0 If SHMCTL or SHMDT was successful.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
The error codes returned depend on the type of shared memory
operations performed and are described in shmget, shmctl, shmat,
shmdt.
EINVAL P1 argument is not in the range of 0 through 3.
Licensed material--property of copyright holder(s) 1
shmsys(2) DG/UX 5.4.2 shmsys(2)
SEE ALSO
intro(2), shmget(2), shmctl(2), shmat(2), shmdt(2).
Licensed material--property of copyright holder(s) 2