summaryrefslogtreecommitdiff
path: root/src/sys/syscall.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-08-26 21:03:52 -0700
committerBryant Mairs <bryant@mai.rs>2017-08-27 15:40:57 -0700
commitd322aa9a3f8e685eb6f48843f22ec12127f6251d (patch)
tree5254e08504fe7a9a4ed0b52103926c0e2b53802b /src/sys/syscall.rs
parenta1067a2ffbd92030fd82525c8dca501e7f5945fb (diff)
downloadnix-d322aa9a3f8e685eb6f48843f22ec12127f6251d.zip
Remove syscall module.
This module merely contained FFI declarations, and only enough to implement memfd_create() and pivot_root() wrapper functions in nix. Since these declarations are redundant with equivalent FFI declarations in libc, we'll remove them here. In the future, any syscall-related wrapper function will be implemented directly and utilize libc for FFI declarations as we cannot generically expose a type-safe `syscall()` because of its variadic argument list.
Diffstat (limited to 'src/sys/syscall.rs')
-rw-r--r--src/sys/syscall.rs91
1 files changed, 0 insertions, 91 deletions
diff --git a/src/sys/syscall.rs b/src/sys/syscall.rs
deleted file mode 100644
index 50866ca7..00000000
--- a/src/sys/syscall.rs
+++ /dev/null
@@ -1,91 +0,0 @@
-//! Indirect system call
-//!
-use libc::c_int;
-
-pub use self::arch::*;
-
-#[cfg(target_arch = "x86_64")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 155;
- pub static MEMFD_CREATE: Syscall = 319;
-}
-
-#[cfg(target_arch = "x86")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 217;
- pub static MEMFD_CREATE: Syscall = 356;
-}
-
-#[cfg(target_arch = "aarch64")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 41;
- pub static MEMFD_CREATE: Syscall = 279;
-}
-
-#[cfg(target_arch = "arm")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 218;
- pub static MEMFD_CREATE: Syscall = 385;
-}
-
-// Rust on mips uses the N32 ABI
-#[cfg(target_arch = "mips")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 216;
- pub static MEMFD_CREATE: Syscall = 354;
-}
-
-// Rust on mips64 uses the N64 ABI
-#[cfg(target_arch = "mips64")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 151;
- pub static MEMFD_CREATE: Syscall = 314;
-}
-
-#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 203;
- pub static MEMFD_CREATE: Syscall = 360;
-}
-
-#[cfg(target_arch = "s390x")]
-mod arch {
- use libc::c_long;
-
- pub type Syscall = c_long;
-
- pub static SYSPIVOTROOT: Syscall = 217;
- pub static MEMFD_CREATE: Syscall = 350;
-}
-
-extern {
- pub fn syscall(num: Syscall, ...) -> c_int;
-}