Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ semsys(2) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

semctl(2)

semget(2)

semop(2)



semsys(2)                        DG/UX 5.4.2                       semsys(2)


NAME
       semsys - perform a semaphore operation

SYNOPSIS
       #include <sys/types.h>
       #include <sys/ipc.h>
       #include <sys/sem.h>

       int  semsys  (P1, P2, P3, P4, P5)
       int  P1;
       int  P2;
       int  P3;
       int  P4;
       int  P5;

   where:
       P1     An integer indicating the type of operation to be performed
              with a semaphore (0 = SEMCTL, 1 = SEMGET, 2 = SEMOP)

       P2     The semaphore set key, if the P1 operation is SEMGET;
              otherwise, the semaphore set id

       P3     A value that varies based on the following P1 operations:
              SEMCTL  The number of some semaphore in the set
              SEMGET  The number of semaphores in the set
              SEMOP   A pointer to the semaphore operation structures
                      (sembuf)

       P4     A value that varies based on the following P1 operations:
              SEMCTL  The control command number
              SEMGET  A flag regulating the type of SEMGET operation and
                      access to the semaphore set
              SEMOP   The number of semaphore operations to perform

       P5     If the operation is SEMGET or SEMOP, P5 is invalid.  In case
              of SEMCTL, P5 is a union of semun type.

DESCRIPTION
       The semsys system call performs a semaphore operation (SEMGET,
       SEMCTL, SEMOP) indicated by the value of P1.

ACCESS CONTROL
       See the description of the exception condition EACCES in semget(2),
       semop(2), and semctl(2).

RETURN VALUE
       semid     A non-negative integer that identifies the semaphore set
                 identifies the semaphore set associated with key.

       0         semctl or semop was successful.

       -1        An error occurred.  errno is set to indicate the error.





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




semsys(2)                        DG/UX 5.4.2                       semsys(2)


DIAGNOSTICS
       The error codes returned depend on the type of semaphore operations
       performed and are described in semctl(2), semget(2), and semop(2).

       EINVAL    P1 argument is not in the range of 0 through 2.

SEE ALSO
       intro(2), semctl(2), semget(2), semop(2).

















































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


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