Re: [patchv3] pthread_cond_wait and pthread_cond_timedwait can also return EPERM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jan, Florian,

On Fri, Nov 01, 2024 at 02:10:16PM +0100, Alejandro Colomar wrote:
> Hi Jan,
> 
> On Thu, Oct 10, 2024 at 08:39:20PM +0800, Jan Kratochvil wrote:
> > On Thu, 10 Oct 2024 20:25:56 +0800, Florian Weimer wrote:
> > > Indeed, POSIX disallows EINTR for all three wait functions.
> > 
> > Fixed.
> > 
> > 
> > Jan
> > 
> > Signed-off-by: Jan Kratochvil <jan@xxxxxxxxxxxxxxxxx>
> > Reviewed-by: Florian Weimer <fw@xxxxxxxxxxxxx>
> 
> Patch applied.  Thank you both!

Sorry, no; I've removed the patch.  It does two things, but I prefer if
you send two patches, each of which changes one thing, and please
provide a more detailed commit message.  Thanks.

Cheers,
Alex

> 
> Have a lovely day!
> Alex
> 
> > diff --git a/man/man3/pthread_cond_init.3 b/man/man3/pthread_cond_init.3
> > index 42e7eac..df1f631 100644
> > --- a/man/man3/pthread_cond_init.3
> > +++ b/man/man3/pthread_cond_init.3
> > @@ -141,22 +141,28 @@ and a non-zero error code on error.
> >  .
> >  .SH ERRORS
> >  \fBpthread_cond_init\fP,
> > -\fBpthread_cond_signal\fP,
> > -\fBpthread_cond_broadcast\fP,
> > -and \fBpthread_cond_wait\fP
> > +\fBpthread_cond_signal\fP
> > +and \fBpthread_cond_broadcast\fP,
> >  never return an error code.
> >  .P
> > +The \fBpthread_cond_wait\fP function returns
> > +the following error codes on error:
> > +.RS
> > +.TP
> > +\fBEPERM\fP
> > +\fBmutex\fP is not locked.
> > +.RE
> > +.P
> >  The \fBpthread_cond_timedwait\fP function returns
> >  the following error codes on error:
> >  .RS
> >  .TP
> > +\fBEPERM\fP
> > +\fBmutex\fP is not locked.
> > +.TP
> >  \fBETIMEDOUT\fP
> >  The condition variable was not signaled
> >  until the timeout specified by \fIabstime\fP.
> > -.TP
> > -\fBEINTR\fP
> > -\fBpthread_cond_timedwait\fP was interrupted by a signal.
> > -.RE
> >  .P
> >  The \fBpthread_cond_destroy\fP function returns
> >  the following error code on error:
> 
> 
> -- 
> <https://www.alejandro-colomar.es/>



-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux