Multithreaded Programming Guide

sema_destroy(3T)

#include <thread.h>

int sema_destroy(sema_t *sp);

Use sema_destroy() to destroy any state associated with the semaphore pointed to by sp. The space for storing the semaphore is not freed.