Debian Codegraph @

debian/missing-sources/rustix/src/thread/sched_yield.rs

raw
1 use crate::backend;
2
3 /// `sched_yield()`—Hints to the OS that other processes should run.
4 ///
5 /// This function always succeeds.
6 ///
7 /// # References
8 /// - [POSIX]
9 /// - [Linux]
10 ///
11 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sched_yield.html
12 /// [Linux]: https://man7.org/linux/man-pages/man2/sched_yield.2.html
13 #[inline]
14 pub fn sched_yield() {
15 backend::thread::syscalls::sched_yield()
16 }