public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: nonnull on epoll_wait(2) syscall wrappers?
Date: Sat, 20 May 2023 00:50:52 +0200	[thread overview]
Message-ID: <cbc3cd53-72a1-df82-6ed5-b1088660fce1@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2138 bytes --]

Hi Adhemerval,

I was checking the epoll_pwait2(2) man page to see if it needs some
updating for the wrapper you added recently.  It seems all's good.

<https://sourceware.org/bugzilla/show_bug.cgi?id=27359>

However, I noticed that there's a difference between the current
manual page and the glibc wrappers for the 3 related functions:


$ grepc -x /sys/epoll.h$ epoll_wait /usr/include/
/usr/include/x86_64-linux-gnu/sys/epoll.h:124:
extern int epoll_wait (int __epfd, struct epoll_event *__events,
		       int __maxevents, int __timeout)
	__attr_access ((__write_only__, 2, 3));
$ grepc -x /sys/epoll.h$ epoll_pwait /usr/include/
/usr/include/x86_64-linux-gnu/sys/epoll.h:134:
extern int epoll_pwait (int __epfd, struct epoll_event *__events,
			int __maxevents, int __timeout,
			const __sigset_t *__ss)
	__attr_access ((__write_only__, 2, 3));
$ grepc -x /sys/epoll.h$ epoll_pwait2 /usr/include/
/usr/include/x86_64-linux-gnu/sys/epoll.h:144:
extern int epoll_pwait2 (int __epfd, struct epoll_event *__events,
			 int __maxevents, const struct timespec *__timeout,
			 const __sigset_t *__ss)
	__attr_access ((__write_only__, 2, 3));


/usr/include/x86_64-linux-gnu/sys/epoll.h:157:
#  define epoll_pwait2 __epoll_pwait2_time64


The man page synopsis is:


SYNOPSIS
       #include <sys/epoll.h>

       int epoll_wait(int epfd, struct epoll_event *events,
                      int maxevents, int timeout);
       int epoll_pwait(int epfd, struct epoll_event *events,
                      int maxevents, int timeout,
                      const sigset_t *_Nullable sigmask);
       int epoll_pwait2(int epfd, struct epoll_event *events,
                      int maxevents, const struct timespec *_Nullable timeout,
                      const sigset_t *_Nullable sigmask);


I didn't use _Nullable in the events parameter, because I don't think
it can be NULL.  Does it make any sense in any case having a NULL
there?  Should we use nonnull in glibc?

Cheers,
Alex

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2023-05-19 22:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 22:50 Alejandro Colomar [this message]
2023-05-22 20:51 ` Adhemerval Zanella Netto
2023-05-22 22:01   ` [PATCH] Use __nonnull for the epoll_wait(2) family of syscalls Alejandro Colomar
2023-05-23 12:27     ` Adhemerval Zanella Netto
2023-05-29 17:39       ` Adhemerval Zanella Netto
2023-05-29 23:17         ` Alejandro Colomar
2023-05-30 11:41           ` Adhemerval Zanella Netto
2023-05-31 20:44   ` [PATCH v2 1/2] Fix invalid use of NULL in epoll_pwait2(2) test Alejandro Colomar
2023-06-01 17:59     ` Adhemerval Zanella Netto
2023-05-31 20:44   ` [PATCH v2 2/2] Use __nonnull for the epoll_wait(2) family of syscalls Alejandro Colomar
2023-06-01 18:00     ` Adhemerval Zanella Netto
2023-06-01 23:46       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbc3cd53-72a1-df82-6ed5-b1088660fce1@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).