Thread (7 messages) 7 messages, 3 authors, 2024-11-01

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

From: Alejandro Colomar <alx@kernel.org>
Date: 2024-11-01 13:10:16

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:
quoted
Indeed, POSIX disallows EINTR for all three wait functions.
Fixed.


Jan

Signed-off-by: Jan Kratochvil <redacted>
Reviewed-by: Florian Weimer <redacted>
Patch applied.  Thank you both!

Have a lovely day!
Alex
quoted hunk ↗ jump to hunk
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/>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help