diff options
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/event/epoll.rs')
-rw-r--r-- | vendor/rustix/src/backend/linux_raw/event/epoll.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/event/epoll.rs b/vendor/rustix/src/backend/linux_raw/event/epoll.rs index 6577feb51..ecd48b784 100644 --- a/vendor/rustix/src/backend/linux_raw/event/epoll.rs +++ b/vendor/rustix/src/backend/linux_raw/event/epoll.rs @@ -92,6 +92,9 @@ bitflags! { pub struct CreateFlags: c::c_uint { /// `EPOLL_CLOEXEC` const CLOEXEC = linux_raw_sys::general::EPOLL_CLOEXEC; + + /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags> + const _ = !0; } } @@ -144,6 +147,9 @@ bitflags! { /// `EPOLLEXCLUSIVE` const EXCLUSIVE = linux_raw_sys::general::EPOLLEXCLUSIVE as u32; + + /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags> + const _ = !0; } } @@ -160,8 +166,8 @@ pub fn create(flags: CreateFlags) -> io::Result<OwnedFd> { /// `epoll_ctl(self, EPOLL_CTL_ADD, data, event)`—Adds an element to an /// epoll object. /// -/// This registers interest in any of the events set in `events` occurring -/// on the file descriptor associated with `data`. +/// This registers interest in any of the events set in `events` occurring on +/// the file descriptor associated with `data`. /// /// If [`delete`] is not called on the I/O source passed into this function /// before the I/O source is `close`d, then the `epoll` will act as if the I/O @@ -191,8 +197,8 @@ pub fn add( } } -/// `epoll_ctl(self, EPOLL_CTL_MOD, target, event)`—Modifies an element in -/// a given epoll object. +/// `epoll_ctl(self, EPOLL_CTL_MOD, target, event)`—Modifies an element in a +/// given epoll object. /// /// This sets the events of interest with `target` to `events`. #[doc(alias = "epoll_ctl")] @@ -218,8 +224,8 @@ pub fn modify( } } -/// `epoll_ctl(self, EPOLL_CTL_DEL, target, NULL)`—Removes an element in -/// a given epoll object. +/// `epoll_ctl(self, EPOLL_CTL_DEL, target, NULL)`—Removes an element in a +/// given epoll object. #[doc(alias = "epoll_ctl")] #[inline] pub fn delete(epoll: impl AsFd, source: impl AsFd) -> io::Result<()> { @@ -317,8 +323,8 @@ impl EventData { /// Return the value as a `u64`. /// - /// If the stored value was a pointer, the pointer is zero-extended to - /// a `u64`. + /// If the stored value was a pointer, the pointer is zero-extended to a + /// `u64`. #[inline] pub fn u64(self) -> u64 { unsafe { self.as_u64 } |