-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7242fdc
commit 797a457
Showing
4 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use crate::backend; | ||
|
||
/// `pause()` | ||
/// | ||
/// The POSIX `pause` interface returns an error code, but the only thing | ||
/// `pause` does is sleep until interrupted by a signal, so it always | ||
/// returns the same thing with the same error code, so in rustix, the | ||
/// return value is omitted. | ||
/// | ||
/// # References | ||
/// - [POSIX] | ||
/// - [Linux] | ||
/// - [Apple] | ||
/// - [FreeBSD] | ||
/// - [NetBSD] | ||
/// - [OpenBSD] | ||
/// - [DragonFly BSD] | ||
/// - [illumos] | ||
/// | ||
/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/pause.html | ||
/// [Linux]: https://man7.org/linux/man-pages/man2/pause.2.html | ||
/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/pause.3.html | ||
/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=pause&sektion=3 | ||
/// [NetBSD]: https://man.netbsd.org/pause.3 | ||
/// [OpenBSD]: https://man.openbsd.org/pause.3 | ||
/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=pause§ion=3 | ||
/// [illumos]: https://illumos.org/man/2/pause | ||
#[inline] | ||
pub fn pause() { | ||
backend::event::syscalls::pause() | ||
} |