Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
syscall
Commits
64c117af
Unverified
Commit
64c117af
authored
Jan 05, 2018
by
Jeremy Soller
Committed by
GitHub
Jan 05, 2018
Browse files
Merge pull request #22 from jD91mZM2/wifstuff
Add wif* functions
parents
8f012900
e145ba3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
rust-toolchain
0 → 100644
View file @
64c117af
nightly
src/call.rs
View file @
64c117af
...
...
@@ -349,3 +349,29 @@ pub fn write(fd: usize, buf: &[u8]) -> Result<usize> {
pub
fn
sched_yield
()
->
Result
<
usize
>
{
unsafe
{
syscall0
(
SYS_YIELD
)
}
}
/// If wifsignaled(status), the terminating signal.
#[inline(always)]
pub
fn
wtermsig
(
status
:
usize
)
->
usize
{
status
&
0x7f
}
/// True if status indicates normal termination.
#[inline(always)]
pub
fn
wifexited
(
status
:
usize
)
->
bool
{
wtermsig
(
status
)
==
0
}
/// True if status indicates the child is stopped.
#[inline(always)]
pub
fn
wifstopped
(
status
:
usize
)
->
bool
{
(
status
&
0xff
)
==
0x7f
}
/// True if status indicates the child continued after a stop.
#[inline(always)]
pub
fn
wifcontinued
(
status
:
usize
)
->
bool
{
status
==
0xffff
}
/// True if STATUS indicates termination by a signal.
#[inline(always)]
pub
fn
wifsignaled
(
status
:
usize
)
->
bool
{
((
status
&
0x7f
)
+
1
)
as
i8
>=
2
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment