Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
syscall
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jerry Maine
syscall
Commits
e3fd644b
Verified
Commit
e3fd644b
authored
5 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Compile on non-redox platforms but return ENOSYS for all system calls
parent
43c562a9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.toml
+1
-1
1 addition, 1 deletion
Cargo.toml
src/arch/nonredox.rs
+31
-0
31 additions, 0 deletions
src/arch/nonredox.rs
src/lib.rs
+8
-5
8 additions, 5 deletions
src/lib.rs
with
40 additions
and
6 deletions
Cargo.toml
+
1
−
1
View file @
e3fd644b
[package]
name
=
"redox_syscall"
version
=
"0.1.5
5
"
version
=
"0.1.5
6
"
description
=
"A Rust library to access raw Redox system calls"
license
=
"MIT"
authors
=
[
"Jeremy Soller <jackpot51@gmail.com>"
]
...
...
This diff is collapsed.
Click to expand it.
src/arch/nonredox.rs
0 → 100644
+
31
−
0
View file @
e3fd644b
use
super
::
error
::{
Error
,
Result
,
ENOSYS
};
pub
unsafe
fn
syscall0
(
_a
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
pub
unsafe
fn
syscall1
(
_a
:
usize
,
_b
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
// Clobbers all registers - special for clone
pub
unsafe
fn
syscall1_clobber
(
_a
:
usize
,
_b
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
pub
unsafe
fn
syscall2
(
_a
:
usize
,
_b
:
usize
,
_c
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
pub
unsafe
fn
syscall3
(
_a
:
usize
,
_b
:
usize
,
_c
:
usize
,
_d
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
pub
unsafe
fn
syscall4
(
_a
:
usize
,
_b
:
usize
,
_c
:
usize
,
_d
:
usize
,
_e
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
pub
unsafe
fn
syscall5
(
_a
:
usize
,
_b
:
usize
,
_c
:
usize
,
_d
:
usize
,
_e
:
usize
,
_f
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
ENOSYS
))
}
This diff is collapsed.
Click to expand it.
src/lib.rs
+
8
−
5
View file @
e3fd644b
#![cfg(target_os
=
"redox"
)]
#![feature(asm)]
#![feature(const_fn)]
#![cfg_attr(not(test),
no_std)]
...
...
@@ -15,22 +14,26 @@ pub use self::io::*;
pub
use
self
::
number
::
*
;
pub
use
self
::
scheme
::
*
;
#[cfg(target_arch
=
"arm"
)]
#[cfg(
all(target_os
=
"redox"
,
target_arch
=
"arm"
)
)
]
#[path=
"arch/arm.rs"
]
mod
arch
;
#[cfg(target_arch
=
"aarch64"
)]
#[cfg(
all(target_os
=
"redox"
,
target_arch
=
"aarch64"
)
)
]
#[path=
"arch/aarch64.rs"
]
mod
arch
;
#[cfg(target_arch
=
"x86"
)]
#[cfg(
all(target_os
=
"redox"
,
target_arch
=
"x86"
)
)
]
#[path=
"arch/x86.rs"
]
mod
arch
;
#[cfg(target_arch
=
"x86_64"
)]
#[cfg(
all(target_os
=
"redox"
,
target_arch
=
"x86_64"
)
)
]
#[path=
"arch/x86_64.rs"
]
mod
arch
;
#[cfg(not(target_os
=
"redox"
))]
#[path=
"arch/nonredox.rs"
]
mod
arch
;
/// Function definitions
pub
mod
call
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment