Frees the specified semaphore.
#include <semaphore.h> int sem_destroy ( sem_t *sem );
(IN) Points to the semaphore to free.
If successful, returns 0; otherwise, returns -1 and sets errno to one of the following values:
The semaphore being destroyed must have been allocated by calling sema_init.