Reference

rt_sem_destroy(2)

remove a semaphore

NAME

rt_sem_destroy - remove a semaphore

SYNOPSIS

#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include rt_ipc.h

int rt_sem_destroy(rt_sem_t *sem);

DESCRIPTION

rt_sem_destroy removes a semaphore previously created with rt_sem_create. sem points to the structure used in the corresponding call to rt_sem_create. Semaphore deletion safety is implemented; i.e., any tasks blocked on this semaphore when it is destroyed are allowed to run.

RETURN VALUE

On success, 0 is returned. On failure, a negative value is returned as described below.

ERRORS

-EINVAL

sem does not point to a valid rt_sem_t.

AUTHOR

Jerry Epplin <[email protected]>

SEE ALSO

rt_task_ipc_delete(2), rt_task_ipc_init(2), rt_sem_init(2), rt_sem_post(2), rt_sem_trywait(2), rt_sem_wait(2)