htl: make pthread_cond_destroy return EBUSY on waiters

This commit is contained in:
Samuel Thibault 2020-02-09 19:19:25 +00:00
parent cd94860c56
commit faae4b2bdd

View File

@ -22,7 +22,14 @@
int
__pthread_cond_destroy (pthread_cond_t *cond)
{
return 0;
int ret = 0;
__pthread_spin_lock (&cond->__lock);
if (cond->__queue)
ret = EBUSY;
__pthread_spin_unlock (&cond->__lock);
return ret;
}
strong_alias (__pthread_cond_destroy, pthread_cond_destroy);