NAME

sem_destroy - destroy an unnamed semaphore

SYNOPSIS

#include <semaphore.h>

int sem_destroy(sem_t *sem );
typedef struct {
...
} sem_t; /*opaque POSIX semaphore*/

DESCRIPTION

sem_destroy() is used to destroy the unnamed semaphore, sem, which was initialized by sem_init().

RETURN VALUES

If successful, sem_destroy() returns 0 , otherwise it returns -1 and sets errno to indicate the error condition.

ERRORS

EINVAL

sem is not a valid semaphore.

SEE ALSO

sem_init(), sem_open()

Home page (Kernel)


< Copyright Rowebots Research Inc. and Multiprocessor Toolsmiths Inc. 1987-2018 >