Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sem_destroy(3P4) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sem_init(3P4)

sem_unlink(3P4)

sem_lock(3P4)

sem_unlock(3P4)

sem_trylock(3P4)

sem_destroy(3P4)

NAME

sem_destroy − close connection to a counting semaphore

SYNOPSIS

#include <semaphore.h>

int sem_destroy(sem)
sem_t  ∗sem

DESCRIPTION

The sem_destroy function closes a connection between the calling process and a counting semaphore. The sem_destroy function has no effect on the state of the semaphore sem. 

RETURN VALUE

Upon successful completion, the sem_destroy function returns a zero.  If any of the following conditions occur, the sem_destroy function will return -1 and set errno to the corresponding value:

[EINVAL] The argument sem does not refer to a valid semaphore. 

FILES

/usr/lib/libposix4.a

SEE ALSO

sem_init(3P4), sem_unlink(3P4), sem_lock(3P4), sem_unlock(3P4), sem_trylock(3P4). 

WARNING

The interface to sem_destroy is based on IEEE Draft Standard P1003.4/D12.  This is an unapproved draft, subject to change.  Use of information contained in this unapproved draft is at your own risk.  This interface will change to reflect any changes made by future drafts of POSIX 1003.4. 

CX/UX Programmer’s Reference Manual

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