Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shmsys(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

shmget(2)

shmctl(2)

shmat(2)

shmdt(2)

intro(2)



     shmsys(2)                  DG/UX 4.30                   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;

     PARAMETERS
          P1             An argument which indicates 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 were successful.

          -1             An error occurred.  Errno is set to indicate



     Licensed material--property of copyright holder(s)         Page 1





     shmsys(2)                  DG/UX 4.30                   shmsys(2)



                         the error.

     EXCEPTIONS
          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
          shmget(2), shmctl(2), shmat(2), shmdt(2).
          intro(2).










































     Licensed material--property of copyright holder(s)         Page 2



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