Commit Graph
1 Commits
Author SHA1 Message Date
xXPBSXxandClaude Sonnet 5.5 fc08fd38c4 test(libkernel): cover the return values of pthread_mutex_trylock
pthread_mutex_trylock returns an errno value, unlike the Sce function it
wraps, and had no test. Check the FreeBSD 11.4 results of
__pthread_mutex_trylock and mutex_self_trylock (lib/libthr/thread/thr_mutex.c
lines 611-640 and 850-873): a free or statically initialised mutex returns 0,
a mutex held by the caller returns EBUSY for the error-checking and normal
types and 0 for the recursive type, and a mutex held by another thread returns
EBUSY.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-26 18:02:00 +01:00