]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Have pthread_cond_destroy() return EBUSY if the condvar has waiters.
authormarkj <markj@FreeBSD.org>
Fri, 8 Mar 2019 21:07:08 +0000 (21:07 +0000)
committermarkj <markj@FreeBSD.org>
Fri, 8 Mar 2019 21:07:08 +0000 (21:07 +0000)
commitc05293d7d166e7ab1fc20e9eff16ee8a290475d9
tree8a23fd536c093c14ed46703aafd3c8a411d3eefd
parenta8953beba847c9bb4b9e6e40cc7d588d66889a3c
Have pthread_cond_destroy() return EBUSY if the condvar has waiters.

This is not required of a compliant implementation, but it's easy to
check for and helps improve compatibility with other common
implementations.  Moreover, it's consistent with our
pthread_mutex_destroy().

PR: 234805
Reviewed by: jhb, kib, ngie
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19496
contrib/netbsd-tests/lib/libpthread/t_cond.c
lib/libthr/thread/thr_cond.c