Skip to content

Commit 5229c44

Browse files
committed
Add wait, fdatasync, poll and pause for Redox
1 parent 92e63f6 commit 5229c44

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/sys/signal.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ impl SigSet {
464464

465465
/// Suspends execution of the calling thread until one of the signals in the
466466
/// signal mask becomes pending, and returns the accepted signal.
467-
#[cfg(not(target_os = "redox"))]
468467
pub fn wait(&self) -> Result<Signal> {
469468
let mut signum = mem::MaybeUninit::uninit();
470469
let res = unsafe { libc::sigwait(&self.sigset as *const libc::sigset_t, signum.as_mut_ptr()) };

src/unistd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ pub fn mkdir<P: ?Sized + NixPath>(path: &P, mode: Mode) -> Result<()> {
505505
/// }
506506
/// ```
507507
#[inline]
508-
#[cfg(not(target_os = "redox"))]
508+
#[cfg(not(target_os = "redox"))] // RedoxFS does not support fifo yet
509509
pub fn mkfifo<P: ?Sized + NixPath>(path: &P, mode: Mode) -> Result<()> {
510510
let res = path.with_nix_path(|cstr| {
511511
unsafe { libc::mkfifo(cstr.as_ptr(), mode.bits() as mode_t) }
@@ -1327,6 +1327,7 @@ pub fn fsync(fd: RawFd) -> Result<()> {
13271327
// TODO: exclude only Apple systems after https://github.com/rust-lang/libc/pull/211
13281328
#[cfg(any(target_os = "linux",
13291329
target_os = "android",
1330+
target_os = "redox",
13301331
target_os = "emscripten"))]
13311332
#[inline]
13321333
pub fn fdatasync(fd: RawFd) -> Result<()> {
@@ -1661,7 +1662,6 @@ pub fn initgroups(user: &CStr, group: Gid) -> Result<()> {
16611662
///
16621663
/// See also [pause(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pause.html).
16631664
#[inline]
1664-
#[cfg(not(target_os = "redox"))]
16651665
pub fn pause() {
16661666
unsafe { libc::pause() };
16671667
}

test/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ mod test_mq;
150150
#[cfg(not(target_os = "redox"))]
151151
mod test_net;
152152
mod test_nix_path;
153-
#[cfg(not(target_os = "redox"))]
154153
mod test_poll;
155154
#[cfg(not(target_os = "redox"))]
156155
mod test_pty;

0 commit comments

Comments
 (0)