[Bug 198216] According to man page for pthread_cond_destroy it returns EBUSY error code, but it never does
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Mar 5 14:52:47 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198216
John Baldwin <jhb at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jhb at FreeBSD.org,
| |kib at FreeBSD.org
--- Comment #1 from John Baldwin <jhb at FreeBSD.org> ---
Adding Konstantin to see what he thinks.
First, the manpage should not say "locked" as you don't lock a condition
variable (this appears to be copied from the pthread_mutex_destroy manpage and
just not updated after it was copied). If it's going to fail with EBUSY it
should be because there are threads blocked on the cv via pthread_cond_*wait().
Looking at the umtx bits, I think it would not be too hard to add a check that
checked _has_user_waiters and __has_kern_waiters and failed with EBUSY if
either were non-zero. The Open Group lists EBUSY as an optional check, but
given that it should be cheap to do I would not be opposed to adding it (and
also fixing the manpage to not say "locked").
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-doc
mailing list