mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
fix error of setting some fields in Epoll to true by default
Add Deprecated Op constants for compatibility Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
This commit is contained in:
parent
2584301978
commit
dbc1282850
1 changed files with 11 additions and 6 deletions
|
|
@ -5706,20 +5706,20 @@ pub const Epoll = packed struct(u32) {
|
|||
//
|
||||
/// Internal flag - wakeup generated by io_uring, used to detect
|
||||
/// recursion back into the io_uring poll handler
|
||||
uring_wake: bool = true,
|
||||
uring_wake: bool = false,
|
||||
/// Set exclusive wakeup mode for the target file descriptor
|
||||
exclusive: bool = true,
|
||||
exclusive: bool = false,
|
||||
/// Request the handling of system wakeup events so as to prevent system
|
||||
/// suspends from happening while those events are being processed.
|
||||
/// Assuming neither EPOLLET nor EPOLLONESHOT is set, system suspends will
|
||||
/// not be re-allowed until epoll_wait is called again after consuming the
|
||||
/// wakeup event(s).
|
||||
/// Requires CAP_BLOCK_SUSPEND
|
||||
wakeup: bool = true,
|
||||
wakeup: bool = false,
|
||||
/// Set the One Shot behaviour for the target file descriptor
|
||||
oneshot: bool = true,
|
||||
oneshot: bool = false,
|
||||
/// Set the Edge Triggered behaviour for the target file descriptor
|
||||
et: bool = true,
|
||||
et: bool = false,
|
||||
|
||||
// Deprecated Named constants
|
||||
// EPOLL event types
|
||||
|
|
@ -5741,10 +5741,15 @@ pub const Epoll = packed struct(u32) {
|
|||
pub const EXCLUSIVE: u32 = @bitCast(Epoll{ .exclusive = true });
|
||||
pub const WAKEUP: u32 = @bitCast(Epoll{ .wakeup = true });
|
||||
pub const ONESHOT: u32 = @bitCast(Epoll{ .oneshot = true });
|
||||
pub const ET: u32 = @bitCast(Epoll{ .let = true });
|
||||
pub const ET: u32 = @bitCast(Epoll{ .et = true });
|
||||
|
||||
/// Flags for epoll_create1
|
||||
pub const CLOEXEC = 1 << @bitOffsetOf(O, "CLOEXEC");
|
||||
|
||||
// Deprecated Op Constants use EpollOp enum type
|
||||
pub const CTL_ADD: u32 = @intFromEnum(EpollOp.ctl_add);
|
||||
pub const CTL_DEL: u32 = @intFromEnum(EpollOp.ctl_del);
|
||||
pub const CTL_MOD: u32 = @intFromEnum(EpollOp.ctl_mod);
|
||||
};
|
||||
|
||||
pub const CLOCK = clockid_t;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue