Skip to content

Commit 9c7eb6c

Browse files
tammelaAkhilTThomas
authored andcommitted
epoll: add busy polling parameters
In Linux 6.9 a new ioctl for epoll was added: https://man.archlinux.org/man/ioctl_eventpoll.2.en Add support for it. The ioctls constants are padded to 64 bits alignment even on 32 bits machines. Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> (backport <rust-lang#3922>) (cherry picked from commit fb58c01) Signed-off-by: Trevor Gross <tmgross@umich.edu>
1 parent e5a380f commit 9c7eb6c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

libc-test/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4260,6 +4260,10 @@ fn test_linux(target: &str) {
42604260
// FIXME: Requires >= 6.11 kernel headers.
42614261
"MAP_DROPPABLE" => true,
42624262

4263+
// FIXME: Requires >= 6.9 kernel headers.
4264+
"EPIOCSPARAMS"
4265+
| "EPIOCGPARAMS" => true,
4266+
42634267
_ => false,
42644268
}
42654269
});

src/unix/linux_like/linux/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,15 @@ cfg_if! {
14861486
}
14871487
}
14881488
}
1489+
1490+
// #include <linux/eventpoll.h>
1491+
1492+
pub struct epoll_params {
1493+
pub busy_poll_usecs: u32,
1494+
pub busy_poll_budget: u16,
1495+
pub prefer_busy_poll: u8,
1496+
pub __pad: u8, // Must be zero
1497+
}
14891498
}
14901499

14911500
s_no_extra_traits! {

0 commit comments

Comments
 (0)