xref: /third_party/rust/crates/rustix/src/io/eventfd.rs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/rustix/src/io/
1b8a62b91Sopenharmony_ciuse crate::fd::OwnedFd;
2b8a62b91Sopenharmony_ciuse crate::{backend, io};
3b8a62b91Sopenharmony_ci
4b8a62b91Sopenharmony_cipub use backend::io::types::EventfdFlags;
5b8a62b91Sopenharmony_ci
6b8a62b91Sopenharmony_ci/// `eventfd(initval, flags)`—Creates a file descriptor for event
7b8a62b91Sopenharmony_ci/// notification.
8b8a62b91Sopenharmony_ci///
9b8a62b91Sopenharmony_ci/// # References
10b8a62b91Sopenharmony_ci///  - [Linux]
11b8a62b91Sopenharmony_ci///
12b8a62b91Sopenharmony_ci/// [Linux]: https://man7.org/linux/man-pages/man2/eventfd.2.html
13b8a62b91Sopenharmony_ci#[inline]
14b8a62b91Sopenharmony_cipub fn eventfd(initval: u32, flags: EventfdFlags) -> io::Result<OwnedFd> {
15b8a62b91Sopenharmony_ci    backend::io::syscalls::eventfd(initval, flags)
16b8a62b91Sopenharmony_ci}
17

Indexes created Thu Nov 07 10:32:03 CST 2024