Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigsem(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

creatsem(S)

opensem(S)

waitsem(S)


 sigsem(S)                      6 January 1993                      sigsem(S)


 Name

    sigsem - signals a process waiting on a semaphore

 Syntax


    cc  . . .  -lx


    int sigsem(sem_num);
    int sem_num;


 Description

    sigsem signals a process that is waiting on the semaphore semnum that it
    may proceed and use the resource governed by the semaphore.  sigsem is
    used in conjunction with waitsem(S) to allow synchronization of processes
    wishing to access a resource.  One or more processes may waitsem on the
    given semaphore and is put to sleep until the process which currently has
    access to the resource issues a sigsem call.  If there are any waiting
    processes, sigsem causes the process which is next in line on the
    semaphore's queue to be rescheduled for execution.  The semaphore's queue
    is organized in first in first out (FIFO) order.

 System compatibility

    sigsem can only be used to signal semaphores created under UNIX Version
    3.0, not for UNIX System V semaphores.

 Diagnostics

    sigsem returns the value (int) -1 if an error occurs.  If semnum does
    not refer to a semaphore type file, errno is set to ENOTNAM.  If semnum
    has not been previously opened by opensem, errno is set to EBADF.  If the
    process issuing a sigsem call is not the current ``owner'' of the sema-
    phore (i.e., if the process has not issued a waitsem call before the sig-
    sem), errno is set to ENAVAIL.

 Notes

    This feature is a XENIX specific enhancement and may not be present in
    all UNIX implementations.

 See also

    creatsem(S), opensem(S), waitsem(S)

 Standards conformance

    sigsem is not part of any currently supported standard; it is an exten-
    sion of AT&T System V provided by the Santa Cruz Operation.


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