man pthread
John Baldwin
jhb at freebsd.org
Mon Aug 11 21:29:10 UTC 2014
On Sunday, July 27, 2014 7:00:13 pm Gavin Atkinson wrote:
> On Mon, 21 Jul 2014, Malcolm Douglas wrote:
> > Sorry, not sure if this is the right way to handle this, but I saw a
> > doc error.
> >
> > The pthread_cond_wait and pthread_cond_timedwait descriptions are
> > incorrect in man pthread.
> >
> > The description is:
> > Wait for a condition and lock the specified mutex.
> >
> > It should be:
> > Wait for a condition and unlock the specified mutex.
>
> The current description is actually correct, but not clear. How about:
>
> pthread_cond_timedwait()
> Unlock the specified mutex, wait no longer than the specified time for
> a condition, and then relock the mutex.
>
> pthread_cond_wait()
> Unlock the specified mutex, wait for a condition, and relock the mutex.
>
> Would that be better?
I believe it is, yes.
--
John Baldwin
More information about the freebsd-doc
mailing list