Hi maintainers, the manual of function thrd_sleep as documented in thrd_create.3 in package devel/libstdthreads contains incorrect information. The same page is served at man.freebsd.org and contains the same incorrect return value section there as well. I think this should be fixed. Following that manual one is lead to checking for thrd_success which happens to be zero on some platforms, but not BSD. Reading that manual should not lead to broken code only working by accident on other platforms but BSD. Regards, -- Christian Index: devel/libstdthreads/patches/patch-thrd_create_3 =================================================================== RCS file: devel/libstdthreads/patches/patch-thrd_create_3 diff -N devel/libstdthreads/patches/patch-thrd_create_3 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/libstdthreads/patches/patch-thrd_create_3 2 Jul 2026 11:23:07 -0000 @@ -0,0 +1,24 @@ +Index: thrd_create.3 +--- thrd_create.3.orig ++++ thrd_create.3 +@@ -191,7 +191,6 @@ If successful, the + .Fn thrd_detach , + .Fn thrd_equal , + .Fn thrd_join , +-.Fn thrd_sleep , + .Fn tss_create + and + .Fn tss_set +@@ -202,6 +201,12 @@ Otherwise an error code will be returned to indicate t + The + .Fn thrd_current + function returns the thread ID of the calling thread. ++.Pp ++The ++.Fn thrd_sleep ++function returns zero if the requested time has elapsed, ++-1 if it has been interrupted by a signal, ++or a negative value (which can also be -1) if it fails. + .Pp + The + .Fn tss_get
No comments:
Post a Comment