git: a0e152973613 - main - libthr: Remove deadcode in join_common

From: ShengYi Hung <aokblast_at_FreeBSD.org>
Date: Sun, 18 Oct 2026 02:07:06 UTC
The branch main has been updated by aokblast:

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

commit a0e152973613e0d0d55257f4e1f614509b7ec4c9
Author:     ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2026-10-13 19:41:00 +0000
Commit:     ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-10-18 02:06:59 +0000

    libthr: Remove deadcode in join_common
    
    The while loop previous can only be break when ret == ETIMEDOUT. They
    never produce EBUSY. Remove the deadcode here.
    
    Reviewed by:    kib
    MFC after:      2 weeks
    Differential Revision: https://reviews.freebsd.org/D60711
---
 lib/libthr/thread/thr_join.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c
index 33eb18638169..16137d482632 100644
--- a/lib/libthr/thread/thr_join.c
+++ b/lib/libthr/thread/thr_join.c
@@ -189,7 +189,7 @@ join_common(pthread_t pthread, void **thread_return,
 	_thr_cancel_leave(curthread, 0);
 	THR_CLEANUP_POP(curthread, 0);
 
-	if (ret == ETIMEDOUT || ret == EBUSY) {
+	if (ret == ETIMEDOUT) {
 		backout_join(pthread, curthread);
 	} else {
 		ret = 0;