pthread_mutex_getyieldloops_np and pthread_mutex_getspinloops_np are not documented. All of the _np functions should be documented in pthread(3) as well -jhb
Created attachment 228157 [details] pthread(3) patch Add remaining pthread _np functions.
I think we actually want a separate pthread_np(3) that pthread(3) references, and perhaps the various pthread_foo_np pages reference as well. However, that shouldn't be too hard to come up with based on the existing patch which does most of the work.
Created attachment 228224 [details] Patch multiple pthread man pages Update references to include pthread_np(3).
Created attachment 228225 [details] New man page pthread_np(3) Add new man page, pthread_np.3, to document FreeBSD extensions to the POSIX threading library.
I would be willing to document pthread_mutex_getyieldloops_np and pthread_mutex_getspinloops_np if someone could describe their operation to me.
Thanks, I've made a few small fixes (wrapping some long lines) and added a few more cross references. One question I have is if I can adjust the license to remove the "All rights reserved" line? We've recently dropped this line from the recommended licenses in FreeBSD and it is generally discouraged for new code. You can see more details about this at https://www.freebsd.org/internal/software-license/.
Created attachment 228615 [details] New man page pthread_np(3) Remove "All rights reserved" from new man page.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=df7d763849655f4038428f97804bf7324d801684 commit df7d763849655f4038428f97804bf7324d801684 Author: Felix Johnson <felix.the.red@gmail.com> AuthorDate: 2021-10-07 17:45:21 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-10-12 20:20:36 +0000 pthread_np.3: Add a manpage summarizing all of the pthread extensions. PR: 197299 MFC after: 1 week share/man/man3/Makefile | 1 + share/man/man3/pthread.3 | 8 +- share/man/man3/pthread_affinity_np.3 | 5 +- share/man/man3/pthread_attr_affinity_np.3 | 3 +- share/man/man3/pthread_attr_get_np.3 | 5 +- share/man/man3/pthread_attr_setcreatesuspend_np.3 | 3 +- share/man/man3/pthread_getthreadid_np.3 | 3 +- share/man/man3/pthread_join.3 | 6 +- share/man/man3/pthread_main_np.3 | 3 +- share/man/man3/pthread_multi_np.3 | 3 +- share/man/man3/pthread_mutexattr_getkind_np.3 | 5 +- share/man/man3/pthread_np.3 (new) | 230 ++++++++++++++++++++++ share/man/man3/pthread_resume_all_np.3 | 3 +- share/man/man3/pthread_resume_np.3 | 3 +- share/man/man3/pthread_set_name_np.3 | 3 +- share/man/man3/pthread_suspend_all_np.3 | 3 +- share/man/man3/pthread_suspend_np.3 | 3 +- share/man/man3/pthread_switch_add_np.3 | 5 +- 18 files changed, 273 insertions(+), 22 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4e56152e47dd0093a09e6dddff2c5538e7af5427 commit 4e56152e47dd0093a09e6dddff2c5538e7af5427 Author: Felix Johnson <felix.the.red@gmail.com> AuthorDate: 2021-10-07 17:45:21 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-10-26 20:59:28 +0000 pthread_np.3: Add a manpage summarizing all of the pthread extensions. PR: 197299 (cherry picked from commit df7d763849655f4038428f97804bf7324d801684) share/man/man3/Makefile | 1 + share/man/man3/pthread.3 | 8 +- share/man/man3/pthread_affinity_np.3 | 5 +- share/man/man3/pthread_attr_affinity_np.3 | 3 +- share/man/man3/pthread_attr_get_np.3 | 5 +- share/man/man3/pthread_attr_setcreatesuspend_np.3 | 3 +- share/man/man3/pthread_getthreadid_np.3 | 3 +- share/man/man3/pthread_join.3 | 6 +- share/man/man3/pthread_main_np.3 | 3 +- share/man/man3/pthread_multi_np.3 | 3 +- share/man/man3/pthread_mutexattr_getkind_np.3 | 5 +- share/man/man3/pthread_np.3 (new) | 230 ++++++++++++++++++++++ share/man/man3/pthread_resume_all_np.3 | 3 +- share/man/man3/pthread_resume_np.3 | 3 +- share/man/man3/pthread_set_name_np.3 | 3 +- share/man/man3/pthread_suspend_all_np.3 | 3 +- share/man/man3/pthread_suspend_np.3 | 3 +- share/man/man3/pthread_switch_add_np.3 | 5 +- 18 files changed, 273 insertions(+), 22 deletions(-)