Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought



dg_psem_info(2)                DG/UX R4.11MU05               dg_psem_info(2)


NAME
       dgpseminfo - get information about the system's POSIX semaphores

SYNOPSIS
       #include <semaphore.h>

       int  dgpseminfo (long * keyptr,
                       struct dgpseminfo * bufferptr,
                       long version)

   where:
       keyptr   On the first call, a pointer to a variable containing the
                 value DG_PSEM_INFO_INITIAL_KEY; on return, a handle that
                 should be used on subsequent calls to this system call

       bufferptr
                 A pointer to a buffer of structure dgpseminfo where the
                 semaphore information will be returned.

       version   The version of the dgpseminfo structure being used.  To
                 use the most recent version this should be set to
                 DG_PSEM_INFO_CURRENT_VERSION.

DESCRIPTION
       Use dgpseminfo to iterate through the system POSIX semaphore table
       to gather information about the semaphores.  Searching continues
       until a semaphore is found (return value (1)), or until the semaphore
       table is completely searched (return value (0)).  Only one search
       through the semaphore table is made.

RETURN VALUE
       1      Successful search, but not done.  The buffer was filled with
              information about a semaphore.  keyptr is given a handle that
              subsequent calls to this routine will use to continue the
              search through the semaphore table.

       0      Successful completion, that is, no more semaphores.  The
              contents of buffer are undefined.

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

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EINVAL  Version is invalid.

       EFAULT  bufferptr or keyptr points to an invalid address.


       SEE ALSO
              semopen(2), seminit(2), semgetvalue(2).


Licensed material--property of copyright holder(s)

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