public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* nonnull on epoll_wait(2) syscall wrappers?
@ 2023-05-19 22:50 Alejandro Colomar
  2023-05-22 20:51 ` Adhemerval Zanella Netto
  0 siblings, 1 reply; 12+ messages in thread
From: Alejandro Colomar @ 2023-05-19 22:50 UTC (permalink / raw)
  To: Adhemerval Zanella, GNU C Library


[-- 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 --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-01 23:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 22:50 nonnull on epoll_wait(2) syscall wrappers? Alejandro Colomar
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

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).