sem_destroy() conforms to ISO/IEC 9945-1:1996 (“POSIX.1”).
POSIX does not define the behavior of
sem_destroy() if called while there are threads blocked on
sem, but this implementation is guaranteed to return -1 and set
errno to
EBUSY if there are threads blocked on
sem.