xref: /third_party/rust/crates/rustix/src/process/sched_yield.rs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/rustix/src/process/
1b8a62b91Sopenharmony_ciuse crate::backend;
2b8a62b91Sopenharmony_ci
3b8a62b91Sopenharmony_ci/// `sched_yield()`—Hints to the OS that other processes should run.
4b8a62b91Sopenharmony_ci///
5b8a62b91Sopenharmony_ci/// This function always succeeds.
6b8a62b91Sopenharmony_ci///
7b8a62b91Sopenharmony_ci/// # References
8b8a62b91Sopenharmony_ci///  - [POSIX]
9b8a62b91Sopenharmony_ci///  - [Linux]
10b8a62b91Sopenharmony_ci///
11b8a62b91Sopenharmony_ci/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_yield.html
12b8a62b91Sopenharmony_ci/// [Linux]: https://man7.org/linux/man-pages/man2/sched_yield.2.html
13b8a62b91Sopenharmony_ci#[inline]
14b8a62b91Sopenharmony_cipub fn sched_yield() {
15b8a62b91Sopenharmony_ci    backend::process::syscalls::sched_yield()
16b8a62b91Sopenharmony_ci}
17

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