Bug 267551 - intro(3): Add `libstdthread` ISO C11 library
Summary: intro(3): Add `libstdthread` ISO C11 library
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gordon Bergling
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-11-03 18:39 UTC by Alois Klink
Modified: 2022-11-10 06:11 UTC (History)
2 users (show)

See Also:


Attachments
`git format-patch` patch file (1.21 KB, patch)
2022-11-03 18:39 UTC, Alois Klink
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alois Klink 2022-11-03 18:39:54 UTC
Created attachment 237851 [details]
`git format-patch` patch file

Document `libstdthreads` (aka the ISO C11 `<threads.h>` library) in the intro(3) manpage.

It's still relatively uncommon to see C11 `<threads.h>` being used, but it's worth documenting, especially since FreeBSD requires a different library for C11 threads compared to glibc (part of `-lpthread`) or musl libc (included by default).

---

My patch is also available on GitHub if that's easier, or if you'd prefer me to make a PR there for CI to run, see https://github.com/aloisklink/freebsd-src/commit/ed23dd8e5012251c2467ecc8dd1347646d5b54bf

https://www.freebsd.org/cgi/man.cgi?query=thrd_create is the documentation for `libstdthreads` in case that helps!

Also, apologies if the formatting on this description is a bit weird, for some reason the description **Preview** window on Bugzilla is blank for me. I can't see any JavaScript errors in my browser, but I have noticed that my fetch requests to https://bugs.freebsd.org/bugzilla/jsonrpc.cgi for method `Bug.render_comment` seem to be returning `{result: {html: null}, version: "1.1"}`, so maybe it's a server-side bug.
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-11-07 10:35:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8a220816c72261efce304568498279fdda6b57cb

commit 8a220816c72261efce304568498279fdda6b57cb
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 10:34:00 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-07 10:34:00 +0000

    intro.3: Document 'libstdthreads' (the ISO C11 '<threads.h>' library).

    It's still relatively uncommon to see C11 '<threads.h>' being used,
    but it's worth documenting, especially since FreeBSD requires a
    different library for C11 threads  compared to glibc (part of '-lpthread')
    or musl libc  (included by default).

    PR:     267551
    Submitted by:   Alois Klink <alois plus freebsd at aloisklink dot com>
    Reviewed by:    pauamma
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D37284

 share/man/man3/intro.3 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Comment 2 Alois Klink 2022-11-09 17:49:40 UTC
(In reply to commit-hook from comment #1)

Awesome :) Thanks for fixing on the `main` branch!

I'll leave this bug open, since it's potentially worth back-porting too, but I'll leave that up to you guys to decide, since it's just a man-page change.

Feel free to close whenever you want!
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-11-10 06:07:31 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1bffa20445ff28f82fbf770b5cdda06b0727c119

commit 1bffa20445ff28f82fbf770b5cdda06b0727c119
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 10:34:00 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-10 06:06:02 +0000

    intro.3: Document 'libstdthreads' (the ISO C11 '<threads.h>' library).

    It's still relatively uncommon to see C11 '<threads.h>' being used,
    but it's worth documenting, especially since FreeBSD requires a
    different library for C11 threads  compared to glibc (part of '-lpthread')
    or musl libc  (included by default).

    PR:     267551
    Submitted by:   Alois Klink <alois plus freebsd at aloisklink dot com>
    Reviewed by:    pauamma
    Differential Revision:  https://reviews.freebsd.org/D37284

    (cherry picked from commit 8a220816c72261efce304568498279fdda6b57cb)

 share/man/man3/intro.3 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-11-10 06:10:33 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d96d13cfa5232e13143f510c931bac2c152a5e54

commit d96d13cfa5232e13143f510c931bac2c152a5e54
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 10:34:00 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-10 06:09:32 +0000

    intro.3: Document 'libstdthreads' (the ISO C11 '<threads.h>' library).

    It's still relatively uncommon to see C11 '<threads.h>' being used,
    but it's worth documenting, especially since FreeBSD requires a
    different library for C11 threads  compared to glibc (part of '-lpthread')
    or musl libc  (included by default).

    PR:     267551
    Submitted by:   Alois Klink <alois plus freebsd at aloisklink dot com>
    Reviewed by:    pauamma
    Differential Revision:  https://reviews.freebsd.org/D37284

    (cherry picked from commit 8a220816c72261efce304568498279fdda6b57cb)

 share/man/man3/intro.3 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Comment 5 Gordon Bergling freebsd_committer freebsd_triage 2022-11-10 06:11:18 UTC
Committed and MFC to stable/12 and stable/13.

Thanks for the patch!