From: Felix von Leitner <felix-kerel@fefe.de>
To: linux-kernel@vger.kernel.org
Subject: epoll_wait conflicts with man page
Date: Sun, 24 Nov 2002 18:46:35 +0100 [thread overview]
Message-ID: <20021124174635.GB16255@codeblau.de> (raw)
I just implemented epoll_create, epoll_ctl and epoll_wait for the diet
libc and found that epoll_wait in 2.5.59 does not expect struct
epoll_event* as second argument but actually struct pollfd*.
That makes it more useful in one sense because porting old poll programs
is easier this way. On the other hand, it makes the whole API less
useful because the epoll_ctl call is documented to use struct
epoll_event which contains opaque user data to enlist a file descriptor.
This data can now not be passed back to user space because it does not
fit in struct pollfd.
By the way: the epoll API looks great! I especially like the opaque
user specified data thing, however making it a union is not so smart
because strace can't meaningfully display it. Also, I would move the
"int fd" out of the union because it is universally useful to know the
file descriptor without having to save it in the opaque data.
Felix
PS: I noticed that the epoll syscall numbers are not #defined on several
platforms, for example sparc and mips.
next reply other threads:[~2002-11-24 17:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-24 17:46 Felix von Leitner [this message]
2002-11-24 17:56 ` Davide Libenzi
2002-11-24 17:57 ` Davide Libenzi
2002-11-24 19:12 ` Davide Libenzi
2002-11-24 20:46 ` Jamie Lokier
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=20021124174635.GB16255@codeblau.de \
--to=felix-kerel@fefe.de \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®