git: a9d7bc9a3242 - stable/15 - libthr cond_wait_user(): do not loop forever on clock error

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 17 Nov 2026 01:09:45 UTC
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a9d7bc9a324277ad5f8bfc75c94da572c4702d27

commit a9d7bc9a324277ad5f8bfc75c94da572c4702d27
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-06 00:46:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-17 00:25:00 +0000

    libthr cond_wait_user(): do not loop forever on clock error
    
    (cherry picked from commit e81badcfc010268d4935f4b4d28ebdbc0faebe0f)
---
 lib/libthr/thread/thr_cond.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c
index c2ce9565e208..32efd4a14f1a 100644
--- a/lib/libthr/thread/thr_cond.c
+++ b/lib/libthr/thread/thr_cond.c
@@ -347,7 +347,7 @@ cond_wait_user(struct pthread_cond *cvp, struct pthread_mutex *mp,
 				_pthread_exit(PTHREAD_CANCELED);
 			else /* this should not happen */
 				return (error2);
-		} else if (error == ETIMEDOUT) {
+		} else if (error != 0 && error != EINTR) {
 			sq = _sleepq_lookup(cvp);
 			cvp->__has_user_waiters =
 			    _sleepq_remove(sq, curthread);