summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/event
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/libc/event')
-rw-r--r--vendor/rustix/src/backend/libc/event/epoll.rs4
-rw-r--r--vendor/rustix/src/backend/libc/event/poll_fd.rs2
-rw-r--r--vendor/rustix/src/backend/libc/event/syscalls.rs8
-rw-r--r--vendor/rustix/src/backend/libc/event/types.rs2
4 files changed, 12 insertions, 4 deletions
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<slice::Iter<'a, Event>>,
}
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 {