Bug 197299

Summary: pthread_np manpage cleanup
Product: Documentation Reporter: Bryan Drewery <bdrewery>
Component: Manual PagesAssignee: John Baldwin <jhb>
Status: Closed FIXED    
Severity: Affects Only Me CC: doc, felix.the.red, jhb
Priority: --- Keywords: needs-qa, patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
pthread(3) patch
none
Patch multiple pthread man pages
felix.the.red: maintainer-approval? (felix.the.red)
New man page pthread_np(3)
none
New man page pthread_np(3) felix.the.red: maintainer-approval? (jhb)

Description Bryan Drewery freebsd_committer freebsd_triage 2015-02-03 20:29:01 UTC
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
Comment 1 Felix Johnson 2021-09-25 03:10:01 UTC
Created attachment 228157 [details]
pthread(3) patch

Add remaining pthread _np functions.
Comment 2 John Baldwin freebsd_committer freebsd_triage 2021-09-27 17:31:06 UTC
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.
Comment 3 Felix Johnson 2021-09-28 05:41:33 UTC
Created attachment 228224 [details]
Patch multiple pthread man pages

Update references to include pthread_np(3).
Comment 4 Felix Johnson 2021-09-28 05:42:28 UTC
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.
Comment 5 Felix Johnson 2021-10-01 06:27:25 UTC
I would be willing to document pthread_mutex_getyieldloops_np and pthread_mutex_getspinloops_np if someone could describe their operation to me.
Comment 6 John Baldwin freebsd_committer freebsd_triage 2021-10-07 17:44:51 UTC
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/.
Comment 7 Felix Johnson 2021-10-12 06:10:28 UTC
Created attachment 228615 [details]
New man page pthread_np(3)

Remove "All rights reserved" from new man page.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-10-12 20:22:12 UTC
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(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-10-26 21:01:01 UTC
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(-)