Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Mar 2015 14:52:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 198216] According to man page for pthread_cond_destroy it returns EBUSY error code, but it never does
Message-ID:  <bug-198216-9-BQ4bIU5SBw@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-198216-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-198216-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198216

John Baldwin <jhb@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jhb@FreeBSD.org,
                   |                            |kib@FreeBSD.org

--- Comment #1 from John Baldwin <jhb@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198216-9-BQ4bIU5SBw>