Page MenuHomeFreeBSD

Add pthread_tryjoin_np(3) as provided by glibc
ClosedPublic

Authored by kib on Jan 18 2026, 12:56 PM.
Tags
None
Referenced Files
F175704401: D54766.id170008.diff
Mon, Oct 12, 3:51 PM
F175704399: D54766.id170059.diff
Mon, Oct 12, 3:51 PM
F175704353: D54766.id169999.diff
Mon, Oct 12, 3:51 PM
F175704158: D54766.id170046.diff
Mon, Oct 12, 3:49 PM
F175702912: D54766.diff
Mon, Oct 12, 3:38 PM
F175702582: D54766.id170059.diff
Mon, Oct 12, 3:35 PM
Unknown Object (File)
Fri, Oct 2, 12:31 PM
Unknown Object (File)
Wed, Sep 30, 11:25 PM
Subscribers

Details

Summary
libthr/thread/thr_join.c: deduplicate backout_join() helper


libthr: add pthread_tryjoin_np()

Similar to the same glibc function.


Document pthread_tryjoin_np(3)


lib/libthr: add pthread_tryjoin(3) test

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jan 18 2026, 12:56 PM

Convert test to the proper atf, instead of using err()

After a second thought, the pthread_tryjoin_np(3) function must be non-cancelling.

lib/libthr/thread/thr_join.c
100

Why not just lock pthread in the caller? There is only one caller that passes thr_locked=false.

share/man/man3/pthread_join.3
112 ↗(On Diff #170008)
113 ↗(On Diff #170008)
114 ↗(On Diff #170008)
kib marked 4 inline comments as done.

Handle review' comments.

This revision is now accepted and ready to land.Jan 19 2026, 4:48 PM