#include <thread.h> int sema_destroy(sema_t *sp);
Use sem_destroy(3RT) to destroy any state associated with the semaphore pointed to by sp. The space for storing the semaphore is not freed.