From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/backend/libc/event/epoll.rs | 4 ++-- vendor/rustix/src/backend/libc/event/poll_fd.rs | 2 +- vendor/rustix/src/backend/libc/event/syscalls.rs | 8 ++++++++ vendor/rustix/src/backend/libc/event/types.rs | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'vendor/rustix/src/backend/libc/event') diff --git a/vendor/rustix/src/backend/libc/event/epoll.rs b/vendor/rustix/src/backend/libc/event/epoll.rs index b41b05711..ced3be103 100644 --- a/vendor/rustix/src/backend/libc/event/epoll.rs +++ b/vendor/rustix/src/backend/libc/event/epoll.rs @@ -278,8 +278,8 @@ pub fn wait(epoll: impl AsFd, event_list: &mut EventVec, timeout: c::c_int) -> i /// An iterator over the `Event`s in an `EventVec`. pub struct Iter<'a> { /// Use `Copied` to copy the struct, since `Event` is `packed` on some - /// platforms, and it's common for users to directly destructure it, - /// which would lead to errors about forming references to packed fields. + /// platforms, and it's common for users to directly destructure it, which + /// would lead to errors about forming references to packed fields. iter: core::iter::Copied>, } diff --git a/vendor/rustix/src/backend/libc/event/poll_fd.rs b/vendor/rustix/src/backend/libc/event/poll_fd.rs index 42f94f3c7..32fd83dd0 100644 --- a/vendor/rustix/src/backend/libc/event/poll_fd.rs +++ b/vendor/rustix/src/backend/libc/event/poll_fd.rs @@ -12,7 +12,7 @@ use { bitflags! { /// `POLL*` flags for use with [`poll`]. /// - /// [`poll`]: crate::io::poll + /// [`poll`]: crate::event::poll #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct PollFlags: c::c_short { diff --git a/vendor/rustix/src/backend/libc/event/syscalls.rs b/vendor/rustix/src/backend/libc/event/syscalls.rs index f2dcdf5ad..725ec8250 100644 --- a/vendor/rustix/src/backend/libc/event/syscalls.rs +++ b/vendor/rustix/src/backend/libc/event/syscalls.rs @@ -181,3 +181,11 @@ pub(crate) fn port_send( ) -> io::Result<()> { unsafe { ret(c::port_send(borrowed_fd(port), events, userdata)) } } + +#[cfg(not(any(windows, target_os = "redox", target_os = "wasi")))] +pub(crate) fn pause() { + let r = unsafe { libc::pause() }; + let errno = libc_errno::errno().0; + debug_assert_eq!(r, -1); + debug_assert_eq!(errno, libc::EINTR); +} diff --git a/vendor/rustix/src/backend/libc/event/types.rs b/vendor/rustix/src/backend/libc/event/types.rs index ea4776667..a04d7e6cf 100644 --- a/vendor/rustix/src/backend/libc/event/types.rs +++ b/vendor/rustix/src/backend/libc/event/types.rs @@ -17,7 +17,7 @@ use bitflags::bitflags; bitflags! { /// `EFD_*` flags for use with [`eventfd`]. /// - /// [`eventfd`]: crate::io::eventfd + /// [`eventfd`]: crate::event::eventfd #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct EventfdFlags: u32 { -- cgit v1.2.3