Document nullability of syscall parameters
cover Document nullability of syscall parameters
Hi!
This patch set documents which parameters of syscalls accept NULL. Actually, some syscalls may also accept it (but return always an error), but per the recent discussion on the glibc mailing list, I decided to ignore that behavior and treat them as if they were _Nonnull.
So when a function is documented with a _Nullable parameter, it means that calling the function with NULL is meaningful.
I decided to use one of the Clang qualifiers because the [[gnu::nonnull]] attribute is not as precise (for example in the case of pointers to pointers).
I decided to use _Nullable and not _Nonnull because there are many more functions that don't accept NULL than those that do, so _Nullable is the least noisy.
When POSIX or other systems are more restrictive than GNU/Linux, I chose to be more restrictive in the prototype, to avoid confusion (this is similar to what was done with 'restrict', which was specified if any system or POSIX used it, even if glibc didn't require restrict --maybe those were glibc bugs--).
Cheers,
Alex
Alejandro Colomar (41):
accept.2: SYNOPSIS: Add _Nullable
acct.2: SYNOPSIS: Add _Nullable
clock_getres.2: SYNOPSIS: Add _Nullable
clock_nanosleep.2: SYNOPSIS: Add _Nullable
clone.2: SYNOPSIS: Add _Nullable
copy_file_range.2: SYNOPSIS: Add _Nullable
epoll_ctl.2: SYNOPSIS: Add _Nullable
epoll_wait.2: SYNOPSIS: Add _Nullable
execve.2: SYNOPSIS: Add _Nullable
execveat.2: SYNOPSIS: Add _Nullable
fanotify_mark.2: SYNOPSIS: Add _Nullable
getcpu.2: SYNOPSIS: Add _Nullable
getgroups.2: SYNOPSIS: Add _Nullable
getitimer.2: SYNOPSIS: Add _Nullable
getrlimit.2: SYNOPSIS: Add _Nullable
gettimeofday.2: SYNOPSIS: Add _Nullable
listxattr.2: SYNOPSIS: Add _Nullable
mount.2: SYNOPSIS: Add _Nullable
nanosleep.2: SYNOPSIS: Add _Nullable
pidfd_send_signal.2: SYNOPSIS: Add _Nullable
poll.2: SYNOPSIS: Add _Nullable
quotactl.2: SYNOPSIS: Add _Nullable
recv.2: SYNOPSIS: Add _Nullable
request_key.2: SYNOPSIS: Add _Nullable
select.2: SYNOPSIS: Add _Nullable
semop.2: SYNOPSIS: Add _Nullable
sendfile.2: SYNOPSIS: Add _Nullable
shmop.2: SYNOPSIS: Add _Nullable
sigaction.2: SYNOPSIS: Add _Nullable
sigaltstack.2: SYNOPSIS: Add _Nullable
sigprocmask.2: SYNOPSIS: Add _Nullable
sigwaitinfo.2: SYNOPSIS: Add _Nullable
splice.2: SYNOPSIS: Add _Nullable
time.2: SYNOPSIS: Add _Nullable
timer_create.2: SYNOPSIS: Add _Nullable
timer_settime.2: SYNOPSIS: Add _Nullable
timerfd_create.2: SYNOPSIS: Add _Nullable
utime.2: SYNOPSIS: Add _Nullable
utimensat.2: SYNOPSIS: Add _Nullable
wait.2: SYNOPSIS: Add _Nullable
wait4.2: SYNOPSIS: Add _Nullable
man2/accept.2 | 8 ++++---- man2/acct.2 | 2 +- man2/clock_getres.2 | 2 +- man2/clock_nanosleep.2 | 2 +- man2/clone.2 | 10 ++++++---- man2/copy_file_range.2 | 4 ++-- man2/epoll_ctl.2 | 2 +- man2/epoll_wait.2 | 7 ++++--- man2/execve.2 | 4 ++-- man2/execveat.2 | 3 ++- man2/fanotify_mark.2 | 4 ++-- man2/getcpu.2 | 3 ++- man2/getgroups.2 | 2 +- man2/getitimer.2 | 2 +- man2/getrlimit.2 | 5 +++-- man2/gettimeofday.2 | 4 ++-- man2/listxattr.2 | 6 +++--- man2/mount.2 | 2 +- man2/nanosleep.2 | 3 ++- man2/pidfd_send_signal.2 | 5 ++--- man2/poll.2 | 3 ++- man2/quotactl.2 | 4 ++-- man2/recv.2 | 4 ++-- man2/request_key.2 | 2 +- man2/select.2 | 16 +++++++++------- man2/semop.2 | 2 +- man2/sendfile.2 | 5 +++-- man2/shmop.2 | 3 ++- man2/sigaction.2 | 5 +++-- man2/sigaltstack.2 | 4 ++-- man2/sigprocmask.2 | 15 ++++++++------- man2/sigwaitinfo.2 | 4 ++-- man2/splice.2 | 6 +++--- man2/time.2 | 2 +- man2/timer_create.2 | 3 ++- man2/timer_settime.2 | 2 +- man2/timerfd_create.2 | 2 +- man2/utime.2 | 6 ++++-- man2/utimensat.2 | 4 ++-- man2/wait.2 | 4 ++-- man2/wait4.2 | 7 ++++--- 41 files changed, 100 insertions(+), 83 deletions(-)
Signature · 1 line
2.38.1
PATCH 1/41 accept.2: SYNOPSIS: Add _Nullable
--- man2/accept.2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
man2/accept.2 +4 -4
@@ -20,14 +20,14 @@ .SH SYNOPSIS .nf .B #include <sys/socket.h> .PP -.BI "int accept(int " sockfd ", struct sockaddr *restrict " addr , -.BI " socklen_t *restrict " addrlen ); +.BI "int accept(int " sockfd ", struct sockaddr *_Nullable restrict " addr , +.BI " socklen_t *_Nullable restrict " addrlen ); .PP .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <sys/socket.h> .PP -.BI "int accept4(int " sockfd ", struct sockaddr *restrict " addr , -.BI " socklen_t *restrict " addrlen ", int " flags ); +.BI "int accept4(int " sockfd ", struct sockaddr *_Nullable restrict " addr , +.BI " socklen_t *_Nullable restrict " addrlen ", int " flags ); .fi .SH DESCRIPTION The
Signature · 1 line
2.38.1
PATCH 2/41 acct.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/acct.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/acct.2 +1 -1
@@ -19,7 +19,7 @@ .SH SYNOPSIS .nf .B #include <unistd.h> .PP -.BI "int acct(const char *" filename ); +.BI "int acct(const char *_Nullable " filename ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 3/41 clock_getres.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/clock_getres.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/clock_getres.2 +1 -1
@@ -23,7 +23,7 @@ .SH SYNOPSIS .nf .B #include <time.h> .PP -.BI "int clock_getres(clockid_t " clockid ", struct timespec *" res ); +.BI "int clock_getres(clockid_t " clockid ", struct timespec *_Nullable " res ); .PP .BI "int clock_gettime(clockid_t " clockid ", struct timespec *" tp ); .BI "int clock_settime(clockid_t " clockid ", const struct timespec *" tp );
Signature · 1 line
2.38.1
PATCH 4/41 clock_nanosleep.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/clock_nanosleep.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/clock_nanosleep.2 +1 -1
@@ -20,7 +20,7 @@ .SH SYNOPSIS .PP .BI "int clock_nanosleep(clockid_t " clockid ", int " flags , .BI " const struct timespec *" request , -.BI " struct timespec *" remain ); +.BI " struct timespec *_Nullable " remain ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 5/41 clone.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/clone.2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
man2/clone.2 +6 -4
@@ -50,10 +50,12 @@ .SH SYNOPSIS .B #define _GNU_SOURCE .B #include <sched.h> .PP -.BI "int clone(int (*" "fn" ")(void *), void *" stack \ -", int " flags ", void *" "arg" ", ..." -.BI " /* pid_t *" parent_tid ", void *" tls \ -", pid_t *" child_tid " */ );" +.BI "int clone(int (*" "fn" ")(void *_Nullable), void *" stack \ +", int " flags , +.BI " void *_Nullable " "arg" ", ..." \ +" \fR/*\fP" " pid_t *_Nullable " parent_tid , +.BI " void *_Nullable " tls , +.BI " pid_t *_Nullable " child_tid " \fR*/\fP );" .PP /* For the prototype of the raw clone() system call, see NOTES */ .PP
Signature · 1 line
2.38.1
PATCH 6/41 copy_file_range.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/copy_file_range.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/copy_file_range.2 +2 -2
@@ -13,8 +13,8 @@ .SH SYNOPSIS .B #define _GNU_SOURCE .B #include <unistd.h> .PP -.BI "ssize_t copy_file_range(int " fd_in ", off64_t *" off_in , -.BI " int " fd_out ", off64_t *" off_out , +.BI "ssize_t copy_file_range(int " fd_in ", off64_t *_Nullable " off_in , +.BI " int " fd_out ", off64_t *_Nullable " off_out , .BI " size_t " len ", unsigned int " flags ); .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 7/41 epoll_ctl.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/epoll_ctl.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/epoll_ctl.2 +1 -1
@@ -15,7 +15,7 @@ .SH SYNOPSIS .B #include <sys/epoll.h> .PP .BI "int epoll_ctl(int " epfd ", int " op ", int " fd \ -", struct epoll_event *" event ); +", struct epoll_event *_Nullable " event ); .fi .SH DESCRIPTION This system call is used to add, modify, or remove
Signature · 1 line
2.38.1
PATCH 8/41 epoll_wait.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/epoll_wait.2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
man2/epoll_wait.2 +4 -3
@@ -21,10 +21,11 @@ .SH SYNOPSIS .BI " int " maxevents ", int " timeout ); .BI "int epoll_pwait(int " epfd ", struct epoll_event *" events , .BI " int " maxevents ", int " timeout , -.BI " const sigset_t *" sigmask ); +.BI " const sigset_t *_Nullable " sigmask ); .BI "int epoll_pwait2(int " epfd ", struct epoll_event *" events , -.BI " int " maxevents ", const struct timespec *" timeout , -.BI " const sigset_t *" sigmask ); +.BI " int " maxevents ", \ +const struct timespec *_Nullable " timeout , +.BI " const sigset_t *_Nullable " sigmask ); .fi .SH DESCRIPTION The
Signature · 1 line
2.38.1
PATCH 9/41 execve.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/execve.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/execve.2 +2 -2
@@ -24,8 +24,8 @@ .SH SYNOPSIS .nf .B #include <unistd.h> .PP -.BI "int execve(const char *" pathname ", char *const " argv [], -.BI " char *const " envp []); +.BI "int execve(const char *" pathname ", char *const _Nullable " argv [], +.BI " char *const _Nullable " envp []); .fi .SH DESCRIPTION .BR execve ()
Signature · 1 line
2.38.1
PATCH 10/41 execveat.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/execveat.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man2/execveat.2 +2 -1
@@ -15,7 +15,8 @@ .SH SYNOPSIS .B #include <unistd.h> .PP .BI "int execveat(int " dirfd ", const char *" pathname , -.BI " const char *const " argv "[], const char *const " envp [], +.BI " const char *const _Nullable " argv [], +.BI " const char *const _Nullable " envp [], .BI " int " flags ); .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 11/41 fanotify_mark.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/fanotify_mark.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/fanotify_mark.2 +2 -2
@@ -13,8 +13,8 @@ .SH SYNOPSIS .B #include <sys/fanotify.h> .PP .BI "int fanotify_mark(int " fanotify_fd ", unsigned int " flags , -.BI " uint64_t " mask ", int " dirfd \ -", const char *" pathname ); +.BI " uint64_t " mask ", int " dirfd , +.BI " const char *_Nullable " pathname ); .fi .SH DESCRIPTION For an overview of the fanotify API, see
Signature · 1 line
2.38.1
PATCH 12/41 getcpu.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/getcpu.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man2/getcpu.2 +2 -1
@@ -20,7 +20,8 @@ .SH SYNOPSIS .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <sched.h> .PP -.BI "int getcpu(unsigned int *" cpu ", unsigned int *" node ); +.BI "int getcpu(unsigned int *_Nullable " cpu ", \ +unsigned int *_Nullable " node ); .fi .SH DESCRIPTION The
Signature · 1 line
2.38.1
PATCH 13/41 getgroups.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/getgroups.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/getgroups.2 +1 -1
@@ -23,7 +23,7 @@ .SH SYNOPSIS .PP .B #include <grp.h> .PP -.BI "int setgroups(size_t " size ", const gid_t *" list ); +.BI "int setgroups(size_t " size ", const gid_t *_Nullable " list ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 14/41 getitimer.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/getitimer.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/getitimer.2 +1 -1
@@ -22,7 +22,7 @@ .SH SYNOPSIS .PP .BI "int getitimer(int " which ", struct itimerval *" curr_value ); .BI "int setitimer(int " which ", const struct itimerval *restrict " new_value , -.BI " struct itimerval *restrict " old_value ); +.BI " struct itimerval *_Nullable restrict " old_value ); .fi .SH DESCRIPTION These system calls provide access to interval timers, that is,
Signature · 1 line
2.38.1
PATCH 15/41 getrlimit.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/getrlimit.2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
man2/getrlimit.2 +3 -2
@@ -54,8 +54,9 @@ .SH SYNOPSIS .BI "int getrlimit(int " resource ", struct rlimit *" rlim ); .BI "int setrlimit(int " resource ", const struct rlimit *" rlim ); .PP -.BI "int prlimit(pid_t " pid ", int " resource ", const struct rlimit *" new_limit , -.BI " struct rlimit *" old_limit ); +.BI "int prlimit(pid_t " pid ", int " resource , +.BI " const struct rlimit *_Nullable " new_limit , +.BI " struct rlimit *_Nullable " old_limit ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 16/41 gettimeofday.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/gettimeofday.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/gettimeofday.2 +2 -2
@@ -28,9 +28,9 @@ .SH SYNOPSIS .B #include <sys/time.h> .PP .BI "int gettimeofday(struct timeval *restrict " tv , -.BI " struct timezone *restrict " tz ); +.BI " struct timezone *_Nullable restrict " tz ); .BI "int settimeofday(const struct timeval *" tv , -.BI " const struct timezone *" tz ); +.BI " const struct timezone *_Nullable " tz ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 17/41 listxattr.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/listxattr.2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
man2/listxattr.2 +3 -3
@@ -14,11 +14,11 @@ .SH SYNOPSIS .nf .B #include <sys/xattr.h> .PP -.BI "ssize_t listxattr(const char *" path ", char *" list \ +.BI "ssize_t listxattr(const char *" path ", char *_Nullable " list \ ", size_t " size ); -.BI "ssize_t llistxattr(const char *" path ", char *" list \ +.BI "ssize_t llistxattr(const char *" path ", char *_Nullable " list \ ", size_t " size ); -.BI "ssize_t flistxattr(int " fd ", char *" list ", size_t " size ); +.BI "ssize_t flistxattr(int " fd ", char *_Nullable " list ", size_t " size ); .fi .SH DESCRIPTION Extended attributes are
Signature · 1 line
2.38.1
PATCH 18/41 mount.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/mount.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/mount.2 +1 -1
@@ -29,7 +29,7 @@ .SH SYNOPSIS .PP .BI "int mount(const char *" source ", const char *" target , .BI " const char *" filesystemtype ", unsigned long " mountflags , -.BI " const void *" data ); +.BI " const void *_Nullable " data ); .fi .SH DESCRIPTION .BR mount ()
Signature · 1 line
2.38.1
PATCH 19/41 nanosleep.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/nanosleep.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man2/nanosleep.2 +2 -1
@@ -22,7 +22,8 @@ .SH SYNOPSIS .nf .B #include <time.h> .PP -.BI "int nanosleep(const struct timespec *" req ", struct timespec *" rem ); +.BI "int nanosleep(const struct timespec *" req , +.BI " struct timespec *_Nullable " rem ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 20/41 pidfd_send_signal.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/pidfd_send_signal.2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
man2/pidfd_send_signal.2 +2 -3
@@ -15,9 +15,8 @@ .SH SYNOPSIS .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" .B #include <unistd.h> .PP -.BI "int syscall(SYS_pidfd_send_signal, int " pidfd ", int " sig \ -", siginfo_t *" info , -.BI " unsigned int " flags ); +.BI "int syscall(SYS_pidfd_send_signal, int " pidfd ", int " sig , +.BI " siginfo_t *_Nullable " info ", unsigned int " flags ); .fi .PP .IR Note :
Signature · 1 line
2.38.1
PATCH 21/41 poll.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/poll.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man2/poll.2 +2 -1
@@ -23,7 +23,8 @@ .SH SYNOPSIS .B #include <poll.h> .PP .BI "int ppoll(struct pollfd *" fds ", nfds_t " nfds , -.BI " const struct timespec *" tmo_p ", const sigset_t *" sigmask ); +.BI " const struct timespec *_Nullable " tmo_p , +.BI " const sigset_t *_Nullable " sigmask ); .fi .SH DESCRIPTION .BR poll ()
Signature · 1 line
2.38.1
PATCH 22/41 quotactl.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/quotactl.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/quotactl.2 +2 -2
@@ -17,8 +17,8 @@ .SH SYNOPSIS " constants" .RB " (or " <linux/dqblk_xfs.h> "; see NOTES) */" .PP -.BI "int quotactl(int " cmd ", const char *" special ", int " id \ -", caddr_t " addr ); +.BI "int quotactl(int " cmd ", const char *_Nullable " special ", int " id , +.BI " caddr_t " addr ); .fi .SH DESCRIPTION The quota system can be used to set per-user, per-group, and per-project limits
Signature · 1 line
2.38.1
PATCH 23/41 recv.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/recv.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/recv.2 +2 -2
@@ -24,8 +24,8 @@ .SH SYNOPSIS .BI " int " flags ); .BI "ssize_t recvfrom(int " sockfd ", void " buf "[restrict ." len "], size_t " len , .BI " int " flags , -.BI " struct sockaddr *restrict " src_addr , -.BI " socklen_t *restrict " addrlen ); +.BI " struct sockaddr *_Nullable restrict " src_addr , +.BI " socklen_t *_Nullable restrict " addrlen ); .BI "ssize_t recvmsg(int " sockfd ", struct msghdr *" msg ", int " flags ); .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 24/41 request_key.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/request_key.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/request_key.2 +1 -1
@@ -15,7 +15,7 @@ .SH SYNOPSIS .B #include <keyutils.h> .PP .BI "key_serial_t request_key(const char *" type ", const char *" description , -.BI " const char *" callout_info , +.BI " const char *_Nullable " callout_info , .BI " key_serial_t " dest_keyring ); .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 25/41 select.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/select.2 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
man2/select.2 +9 -7
@@ -30,19 +30,21 @@ .SH SYNOPSIS .PP .BR typedef " /* ... */ " fd_set; .PP -.BI "int select(int " nfds ", fd_set *restrict " readfds , -.BI " fd_set *restrict " writefds ", fd_set *restrict " exceptfds , -.BI " struct timeval *restrict " timeout ); +.BI "int select(int " nfds ", fd_set *_Nullable restrict " readfds , +.BI " fd_set *_Nullable restrict " writefds , +.BI " fd_set *_Nullable restrict " exceptfds , +.BI " struct timeval *_Nullable restrict " timeout ); .PP .BI "void FD_CLR(int " fd ", fd_set *" set ); .BI "int FD_ISSET(int " fd ", fd_set *" set ); .BI "void FD_SET(int " fd ", fd_set *" set ); .BI "void FD_ZERO(fd_set *" set ); .PP -.BI "int pselect(int " nfds ", fd_set *restrict " readfds , -.BI " fd_set *restrict " writefds ", fd_set *restrict " exceptfds , -.BI " const struct timespec *restrict " timeout , -.BI " const sigset_t *restrict " sigmask ); +.BI "int pselect(int " nfds ", fd_set *_Nullable restrict " readfds , +.BI " fd_set *_Nullable restrict " writefds , +.BI " fd_set *_Nullable restrict " exceptfds , +.BI " const struct timespec *_Nullable restrict " timeout , +.BI " const sigset_t *_Nullable restrict " sigmask ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 26/41 semop.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/semop.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/semop.2 +1 -1
@@ -24,7 +24,7 @@ .SH SYNOPSIS .PP .BI "int semop(int " semid ", struct sembuf *" sops ", size_t " nsops ); .BI "int semtimedop(int " semid ", struct sembuf *" sops ", size_t " nsops , -.BI " const struct timespec *" timeout ); +.BI " const struct timespec *_Nullable " timeout ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 27/41 sendfile.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/sendfile.2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
man2/sendfile.2 +3 -2
@@ -26,8 +26,9 @@ .SH SYNOPSIS .nf .B #include <sys/sendfile.h> .PP -.BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" \ - offset ", size_t" " count" ); +.BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", \ +off_t *_Nullable " offset , +.BI " size_t" " count" ); .\" The below is too ugly. Comments about glibc versions belong .\" in the notes, not in the header. .\"
Signature · 1 line
2.38.1
PATCH 28/41 shmop.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/shmop.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man2/shmop.2 +2 -1
@@ -27,7 +27,8 @@ .SH SYNOPSIS .nf .B #include <sys/shm.h> .PP -.BI "void *shmat(int " shmid ", const void *" shmaddr ", int " shmflg ); +.BI "void *shmat(int " shmid ", const void *_Nullable " shmaddr ", \ +int " shmflg ); .BI "int shmdt(const void *" shmaddr ); .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 29/41 sigaction.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/sigaction.2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
man2/sigaction.2 +3 -2
@@ -35,8 +35,9 @@ .SH SYNOPSIS .nf .B #include <signal.h> .PP -.BI "int sigaction(int " signum ", const struct sigaction *restrict " act , -.BI " struct sigaction *restrict " oldact ); +.BI "int sigaction(int " signum , +.BI " const struct sigaction *_Nullable restrict " act , +.BI " struct sigaction *_Nullable restrict " oldact ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 30/41 sigaltstack.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/sigaltstack.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/sigaltstack.2 +2 -2
@@ -13,8 +13,8 @@ .SH SYNOPSIS .nf .B #include <signal.h> .PP -.BI "int sigaltstack(const stack_t *restrict " ss \ -", stack_t *restrict " old_ss ); +.BI "int sigaltstack(const stack_t *_Nullable restrict " ss , +.BI " stack_t *_Nullable restrict " old_ss ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 31/41 sigprocmask.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/sigprocmask.2 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
man2/sigprocmask.2 +8 -7
@@ -17,22 +17,23 @@ .SH SYNOPSIS .PP .nf /* Prototype for the glibc wrapper function */ -.BI "int sigprocmask(int " how ", const sigset_t *restrict " set , -.BI " sigset_t *restrict " oldset ); +.BI "int sigprocmask(int " how ", const sigset_t *_Nullable restrict " set , +.BI " sigset_t *_Nullable restrict " oldset ); .PP .BR "#include <signal.h>" " /* Definition of " SIG_* " constants */" .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" .B #include <unistd.h> .PP /* Prototype for the underlying system call */ -.BI "int syscall(SYS_rt_sigprocmask, int " how ", const kernel_sigset_t *" set , -.BI " kernel_sigset_t *" oldset \ -", size_t " sigsetsize ); +.BI "int syscall(SYS_rt_sigprocmask, int " how , +.BI " const kernel_sigset_t *_Nullable " set , +.BI " kernel_sigset_t *_Nullable " oldset , +.BI " size_t " sigsetsize ); .PP /* Prototype for the legacy system call */ .BI "[[deprecated]] int syscall(SYS_sigprocmask, int " how , -.BI " const old_kernel_sigset_t *" set , -.BI " old_kernel_sigset_t *" oldset ); +.BI " const old_kernel_sigset_t *_Nullable " set , +.BI " old_kernel_sigset_t *_Nullable " oldset ); .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 32/41 sigwaitinfo.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/sigwaitinfo.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/sigwaitinfo.2 +2 -2
@@ -14,9 +14,9 @@ .SH SYNOPSIS .B #include <signal.h> .PP .BI "int sigwaitinfo(const sigset_t *restrict " set , -.BI " siginfo_t *restrict " info ); +.BI " siginfo_t *_Nullable restrict " info ); .BI "int sigtimedwait(const sigset_t *restrict " set , -.BI " siginfo_t *restrict " info , +.BI " siginfo_t *_Nullable restrict " info , .BI " const struct timespec *restrict " timeout ); .fi .PP
Signature · 1 line
2.38.1
PATCH 33/41 splice.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/splice.2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
man2/splice.2 +3 -3
@@ -14,9 +14,9 @@ .SH SYNOPSIS .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <fcntl.h> .PP -.BI "ssize_t splice(int " fd_in ", off64_t *" off_in ", int " fd_out , -.BI " off64_t *" off_out ", size_t " len \ -", unsigned int " flags ); +.BI "ssize_t splice(int " fd_in ", off64_t *_Nullable " off_in , +.BI " int " fd_out ", off64_t *_Nullable " off_out , +.BI " size_t " len ", unsigned int " flags ); .\" Return type was long before glibc 2.7 .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 34/41 time.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/time.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/time.2 +1 -1
@@ -16,7 +16,7 @@ .SH SYNOPSIS .nf .B #include <time.h> .PP -.BI "time_t time(time_t *" tloc ); +.BI "time_t time(time_t *_Nullable " tloc ); .fi .SH DESCRIPTION .BR time ()
Signature · 1 line
2.38.1
PATCH 35/41 timer_create.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/timer_create.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man2/timer_create.2 +2 -1
@@ -14,7 +14,8 @@ .SH SYNOPSIS .BR "#include <signal.h>" " /* Definition of " SIGEV_* " constants */" .B #include <time.h> .PP -.BI "int timer_create(clockid_t " clockid ", struct sigevent *restrict " sevp , +.BI "int timer_create(clockid_t " clockid , +.BI " struct sigevent *_Nullable restrict " sevp , .BI " timer_t *restrict " timerid ); .fi .PP
Signature · 1 line
2.38.1
PATCH 36/41 timer_settime.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/timer_settime.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/timer_settime.2 +1 -1
@@ -16,7 +16,7 @@ .SH SYNOPSIS .PP .BI "int timer_settime(timer_t " timerid ", int " flags , .BI " const struct itimerspec *restrict " new_value , -.BI " struct itimerspec *restrict " old_value ); +.BI " struct itimerspec *_Nullable restrict " old_value ); .BI "int timer_gettime(timer_t " timerid ", struct itimerspec *" curr_value ); .fi .PP
Signature · 1 line
2.38.1
PATCH 37/41 timerfd_create.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/timerfd_create.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/timerfd_create.2 +1 -1
@@ -17,7 +17,7 @@ .SH SYNOPSIS .PP .BI "int timerfd_settime(int " fd ", int " flags , .BI " const struct itimerspec *" new_value , -.BI " struct itimerspec *" old_value ); +.BI " struct itimerspec *_Nullable " old_value ); .BI "int timerfd_gettime(int " fd ", struct itimerspec *" curr_value ); .fi .SH DESCRIPTION
Signature · 1 line
2.38.1
PATCH 38/41 utime.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/utime.2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
man2/utime.2 +4 -2
@@ -18,11 +18,13 @@ .SH SYNOPSIS .nf .B #include <utime.h> .PP -.BI "int utime(const char *" filename ", const struct utimbuf *" times ); +.BI "int utime(const char *" filename , +.BI " const struct utimbuf *_Nullable " times ); .PP .B #include <sys/time.h> .PP -.BI "int utimes(const char *" filename ", const struct timeval " times [2]); +.BI "int utimes(const char *" filename , +.BI " const struct timeval " times "[_Nullable 2]);" .fi .SH DESCRIPTION .B Note:
Signature · 1 line
2.38.1
PATCH 39/41 utimensat.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/utimensat.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/utimensat.2 +2 -2
@@ -15,8 +15,8 @@ .SH SYNOPSIS .B #include <sys/stat.h> .PP .BI "int utimensat(int " dirfd ", const char *" pathname , -.BI " const struct timespec " times "[2], int " flags ); -.BI "int futimens(int " fd ", const struct timespec " times [2]); +.BI " const struct timespec " times "[_Nullable 2], int " flags ); +.BI "int futimens(int " fd ", const struct timespec " times "[_Nullable 2]);" .fi .PP .RS -4
Signature · 1 line
2.38.1
PATCH 40/41 wait.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/wait.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/wait.2 +2 -2
@@ -36,8 +36,8 @@ .SH SYNOPSIS .nf .B #include <sys/wait.h> .PP -.BI "pid_t wait(int *" "wstatus" ); -.BI "pid_t waitpid(pid_t " pid ", int *" wstatus ", int " options ); +.BI "pid_t wait(int *_Nullable " "wstatus" ); +.BI "pid_t waitpid(pid_t " pid ", int *_Nullable " wstatus ", int " options ); .PP .BI "int waitid(idtype_t " idtype ", id_t " id \ ", siginfo_t *" infop ", int " options );
Signature · 1 line
2.38.1
PATCH 41/41 wait4.2: SYNOPSIS: Add _Nullable
In reply to Alejandro Colomar--- man2/wait4.2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
man2/wait4.2 +4 -3
@@ -20,9 +20,10 @@ .SH SYNOPSIS .nf .B #include <sys/wait.h> .PP -.BI "pid_t wait3(int *" "wstatus" ", int " options ", struct rusage *" rusage ); -.BI "pid_t wait4(pid_t " pid ", int *" wstatus ", int " options , -.BI " struct rusage *" rusage ); +.BI "pid_t wait3(int *_Nullable " "wstatus" ", int " options , +.BI " struct rusage *_Nullable " rusage ); +.BI "pid_t wait4(pid_t " pid ", int *_Nullable " wstatus ", int " options , +.BI " struct rusage *_Nullable " rusage ); .fi .PP .RS -4
Signature · 1 line
2.38.1