From: Jens Axboe <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
Jens Axboe <[email protected]>
Subject: [PATCH 4/9] eventpoll: add struct wait_queue_entry argument to epoll_wait()
Date: Mon, 3 Feb 2025 09:23:42 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
In preparation for allowing an outside caller to add itself to the epoll
waitqueue, pass in a struct wait_queue_entry. Unused in its current
form, but will be utilized shortly.
No intended functional changes in this patch.
Signed-off-by: Jens Axboe <[email protected]>
---
fs/eventpoll.c | 5 +++--
include/linux/eventpoll.h | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 3cbd290503c7..ecaa5591f4be 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -2470,7 +2470,8 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
}
int epoll_wait(struct file *file, struct epoll_event __user *events,
- int maxevents, struct timespec64 *to)
+ int maxevents, struct timespec64 *to,
+ struct wait_queue_entry *wait)
{
struct eventpoll *ep;
@@ -2509,7 +2510,7 @@ static int do_epoll_wait(int epfd, struct epoll_event __user *events,
/* Get the "struct file *" for the eventpoll file */
CLASS(fd, f)(epfd);
if (!fd_empty(f))
- return epoll_wait(fd_file(f), events, maxevents, to);
+ return epoll_wait(fd_file(f), events, maxevents, to, NULL);
return -EBADF;
}
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h
index 1301fc74aca0..24f9344df5a3 100644
--- a/include/linux/eventpoll.h
+++ b/include/linux/eventpoll.h
@@ -27,7 +27,8 @@ void eventpoll_release_file(struct file *file);
/* Use to reap events */
int epoll_wait(struct file *file, struct epoll_event __user *events,
- int maxevents, struct timespec64 *to);
+ int maxevents, struct timespec64 *to,
+ struct wait_queue_entry *wait);
/* Remove wait entry */
int epoll_wait_remove(struct file *file, struct wait_queue_entry *wait);
--
2.47.2
next prev parent reply other threads:[~2025-02-03 16:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 16:23 [PATCHSET 0/9] io_uring epoll wait support Jens Axboe
2025-02-03 16:23 ` [PATCH 1/9] eventpoll: abstract out main epoll reaper into a function Jens Axboe
2025-02-03 16:23 ` [PATCH 2/9] eventpoll: add helper to remove wait entry from wait queue head Jens Axboe
2025-02-03 16:23 ` [PATCH 3/9] eventpoll: abstract out ep_try_send_events() helper Jens Axboe
2025-02-03 16:23 ` Jens Axboe [this message]
2025-02-03 16:23 ` [PATCH 5/9] eventpoll: add ep_poll_queue() loop Jens Axboe
2025-02-03 16:23 ` [PATCH 6/9] io_uring/epoll: remove CONFIG_EPOLL guards Jens Axboe
2025-02-03 16:23 ` [PATCH 7/9] io_uring/poll: pull ownership handling into poll.h Jens Axboe
2025-02-03 16:23 ` [PATCH 8/9] io_uring/epoll: add support for IORING_OP_EPOLL_WAIT Jens Axboe
2025-02-03 16:23 ` [PATCH 9/9] io_uring/epoll: add multishot " Jens Axboe
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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