Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sem_destroy(2) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



sem_destroy(2)                 DG/UX 5.4R3.00                 sem_destroy(2)


NAME
       sem_destroy - remove access to an unnamed semaphore

SYNOPSIS
       #include <semaphore.h>

       int semdestroy (*sem)
            semt  *sem;

DESCRIPTION
       Use semdestroy(2) to destroy the unnamed semaphore indicated by sem:

        sem    must be a valid semaphore returned by a prior seminit(2)
               call.

       After this call has been made, no process may access sem until
       seminit(2) has been called to re-initialize sem.

       Any processes currently blocked waiting for the semaphore to become
       available, via a call to semwait(2), will be returned EDEADLK when
       the semaphore is destroyed.

   Note
        * This routine is based on POSIX realtime extension document P1003.4
          draft 14. It is therefore subject to change.

        * Compilation of a source file using this routine requires that
          feature macro _POSIX4_DRAFT_SOURCE be defined.  This feature macro
          is not enabled by any other feature macro, nor does it enable any
          other feature macro.

        * The compiled routine must be linked to library librte.a.

RETURN VALUE
       If successful, semdestroy returns 0. If unsuccessful, it returns -1
       and sets ERRNO to:

        EINVAL sem is not a valid unnamed semaphore.

SEE ALSO
       seminit(2), semwait(2), semtrywait(2), sempost(2), semclose(2).
















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


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