Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shmsys(2) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

shmget(2)

shmctl(2)

shmat(2)

shmdt(2)



shmsys(2)                      DG/UX R4.11MU05                     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 = SHMAT, 1 = SHMCTL, 2 = SHMDT, 3 =
              SHMGET)

       P2     In case of SHMCTL or SHMAT, P2 is a shared memory id.  In case
              of SHMDT, P2 is a shared memory segment address.  In case of
              SHMGET, P2 is a shared memory key.

       P3     In case of SHMAT, P3 is the shared memory segment address.  In
              case of SHMCTL, P3 is a control command.  In case of SHMGET,
              P3 is the shared memory segment size.

       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 (SHMAT,
       SHMCTL, SHMDT, SHMGET) 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.

SEE ALSO
       intro(2), shmget(2), shmctl(2), shmat(2), shmdt(2).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026