OK, let's keep this for a separate discussion.
I forgot; there's a new section: LIBRARY.
It specifies the library in which the function is defined, or in the case of syscalls, the wrapper (since we call it through syscall(2), it would be libc).
OK. Similar to futex(2).
BTW, I wonder what librseq is. Is librseq something that users should care about?
Users are not required to use librseq to use the rseq system call,
but it's very convenient to use this C-level API rather than have
each user reimplement the per-architecture assembly code required to
create the RSEQ critical sections.
librseq did not have an official release yet, so that's mainly why I
think it too early to refer to it in manual pages.
.SH SYNOPSIS
.nf
.PP
.BR "#include <linux/rseq.h>" \
" /* Definition of " RSEQ_* " constants and rseq types */"
The line above goes beyond column 80 in formatted output. That's a hard limit for manual pages. If you add this page to the linux man-pages repo, and run the linters, you'll see a warning about that. In case you're interested in linting manual pages in the future, you can do something similar to what I do in the man-pages[2]
OK. I've used it, it's quite useful! I have fixed all warnings except for
"mandoc: man2/rseq.2:5:12: WARNING: cannot parse date, using it verbatim: (date)"
which I suspect is expected.
.BI "int syscall(SYS_rseq, struct rseq *_Nullable " rseq ", uint32_t " rseq_len \
What's the meaning for NULL? Does it have a valid sentinel meaning, or is it an invalid address? If it's just interpreted as an invalid address (for which from a user-space perspective a crash would be legitimate), then I'd remove _Nullable.
With the flags that are currently implemented (0 or RSEQ_FLAG_UNREGISTER),
the rseq argument is not expected to be legitimately NULL (it would return
-1, errno=EFAULT on registration, or -1, errno=EINVAL on unregister attempt).
We may add new flags in the future which would not care about the rseq address
(it could very well be null then). Do you recommend that we only add the
_Nullable tag when this occurs ?
Updated version based on your comments pushed into my repo, thanks!
Mathieu
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature