Index of Section 2 Manual Pages

Interix / SUAsem_destroy.2Interix / SUA

sem_destroy(2)                                           sem_destroy(2)

  sem_destroy()

  NAME

    sem_destroy() - destroy an unnamed semaphore

  SYNOPSIS

    #include 

    int sem_destroy(sem_t *sem);

  DESCRIPTION

    The sem_destroy(2) function destroys the unnamed semaphore referenced by
    the sem argument. The semaphore must have been created by a call to the
    sem_init(2) function. Do not attempt to destroy a semaphore if threads are
    currently blocked on it.

  RETURN VALUES

    On success, the function returns 0; otherwise, -1 is returned and errno is
    set to an error code to indicate the error.

  ERRORS

    The sem_destroy() function can fail for the following reasons:

    [EBUSY]
        One or more threads are currently blocked on the semaphore to be
        destroyed.

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

  SEE ALSO

    semctl(2)

    semget(2)

    semop(2)

    sem_init(2)

  USAGE NOTES

    The sem_destroy function is thread safe.

    The sem_destroy function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA