Skip to content

Commit b6ea5c0

Browse files
committed
Add wait, fdatasync, poll and pause for Redox
1 parent 0d0a189 commit b6ea5c0

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) }
@@ -1325,6 +1325,7 @@ pub fn fsync(fd: RawFd) -> Result<()> {
13251325
// TODO: exclude only Apple systems after https://github.com/rust-lang/libc/pull/211
13261326
#[cfg(any(target_os = "linux",
13271327
target_os = "android",
1328+
target_os = "redox",
13281329
target_os = "emscripten"))]
13291330
#[inline]
13301331
pub fn fdatasync(fd: RawFd) -> Result<()> {
@@ -1659,7 +1660,6 @@ pub fn initgroups(user: &CStr, group: Gid) -> Result<()> {
16591660
///
16601661
/// See also [pause(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pause.html).
16611662
#[inline]
1662-
#[cfg(not(target_os = "redox"))]
16631663
pub fn pause() {
16641664
unsafe { libc::pause() };
16651665
}

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)