diff options
| author | Jens Axboe <axboe@kernel.dk> | 2025-02-19 20:22:26 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-02-20 12:18:37 +0300 |
| commit | ae3a4f1fdc2cfad089e79e2ee4697f84941528d3 (patch) | |
| tree | 4c460d4123dab15d9c065322a97bfd4d989566e9 /include | |
| parent | 38d203560118a673018df5892a6555bb0aba7762 (diff) | |
| download | linux-ae3a4f1fdc2cfad089e79e2ee4697f84941528d3.tar.xz | |
eventpoll: add epoll_sendevents() helper
Basic helper that copies ready events to the specified userspace
address. The event checking is quick and racy, it's up to the caller
to ensure it retries appropriately in case 0 events are copied.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20250219172552.1565603-4-axboe@kernel.dk
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/eventpoll.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 0c0d00fcd131..ccb478eb174b 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -25,6 +25,10 @@ struct file *get_epoll_tfile_raw_ptr(struct file *file, int tfd, unsigned long t /* Used to release the epoll bits inside the "struct file" */ void eventpoll_release_file(struct file *file); +/* Copy ready events to userspace */ +int epoll_sendevents(struct file *file, struct epoll_event __user *events, + int maxevents); + /* * This is called from inside fs/file_table.c:__fput() to unlink files * from the eventpoll interface. We need to have this facility to cleanup |
