Debian Codegraph @

src/lib.rs

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 // Copyright 2014 The syscall.rs Project Developers. See the
2 // COPYRIGHT file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9
10 //! Raw system calls for Rust.
11 //!
12 //! NOTE: Only these architectures have been ported to the stable (as of 1.59) `asm!` macro
13 //!
14 //! - aarch64
15 //! - riscv64
16 //! - x86_64
17 //!
18 //! All the other architectures use the deprecated `llvm_asm!` macro which has already been removed.
19 //! To use this crate with those architectures you'll need to use an older nightly like
20 //! `nightly-2022-01-14`
21
22 // Reference http://man7.org/linux/man-pages/man2/syscall.2.html
23
24 #![allow(deprecated)] // llvm_asm!
25 #![deny(warnings)]
26 #![no_std]
•27 #![cfg(any(target_arch = "aarch64", target_arch = "riscv64", target_arch = "x86_64"))]
28
29 #[cfg(test)]
30 extern crate std;
31
32 pub use platform::*;
33
34 pub mod macros;
35
36 #[cfg(all(any(target_os = "linux", target_os = "android"),
37 target_arch = "aarch64"))]
38 #[path="platform/linux-aarch64/mod.rs"]
39 pub mod platform;
40
41 #[cfg(all(any(target_os = "linux", target_os = "android"),
42 target_arch = "arm"))]
43 #[path="platform/linux-armeabi/mod.rs"]
44 pub mod platform;
45
46 #[cfg(all(any(target_os = "linux", target_os = "android"),
47 target_arch = "mips"))]
48 #[path="platform/linux-mips/mod.rs"]
49 pub mod platform;
50
51 #[cfg(all(any(target_os = "linux", target_os = "android"),
52 target_arch = "mips64"))]
53 #[path="platform/linux-mips64/mod.rs"]
54 pub mod platform;
55
56 #[cfg(all(any(target_os = "linux", target_os = "android"),
57 target_arch = "powerpc"))]
58 #[path="platform/linux-powerpc/mod.rs"]
59 pub mod platform;
60
61 #[cfg(all(any(target_os = "linux", target_os = "android"),
62 target_arch = "powerpc64"))]
63 #[path="platform/linux-powerpc64/mod.rs"]
64 pub mod platform;
65
66 #[cfg(all(any(target_os = "linux", target_os = "android"),
67 target_arch = "riscv64"))]
68 #[path="platform/linux-riscv64/mod.rs"]
69 pub mod platform;
70
71 #[cfg(all(any(target_os = "linux", target_os = "android"),
72 target_arch = "sparc64"))]
73 #[path="platform/linux-sparc64/mod.rs"]
74 pub mod platform;
75
76 #[cfg(all(any(target_os = "linux", target_os = "android"),
77 target_arch = "x86"))]
78 #[path="platform/linux-x86/mod.rs"]
79 pub mod platform;
80
81 #[cfg(all(any(target_os = "linux", target_os = "android"),
82 target_arch = "x86_64"))]
83 #[path="platform/linux-x86_64/mod.rs"]
84 pub mod platform;
85
86 #[cfg(all(target_os = "freebsd",
87 target_arch = "x86_64"))]
88 #[path="platform/freebsd-x86_64/mod.rs"]
89 pub mod platform;
90
91 #[cfg(all(target_os = "macos",
92 target_arch = "x86_64"))]
93 #[path="platform/macos-x86_64/mod.rs"]
94 pub mod platform;
95
96 #[cfg(all(target_os = "macos",
97 target_arch = "aarch64"))]
98 #[path="platform/macos-aarch64/mod.rs"]
99 pub mod platform;