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
a0581db1
Verified
Commit
a0581db1
authored
Jul 28, 2019
by
jD91mZM2
Browse files
Merge ProtFlags and MapFlags
parent
c0dad447
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/data.rs
View file @
a0581db1
use
core
::
ops
::{
Deref
,
DerefMut
};
use
core
::{
mem
,
slice
};
use
crate
::
flag
::{
EventFlags
,
Prot
Flags
,
PtraceFlags
,
SigActionFlags
};
use
crate
::
flag
::{
EventFlags
,
Map
Flags
,
PtraceFlags
,
SigActionFlags
};
#[derive(Copy,
Clone,
Debug,
Default)]
#[repr(C)]
...
...
@@ -58,7 +58,7 @@ impl DerefMut for ITimerSpec {
pub
struct
Map
{
pub
offset
:
usize
,
pub
size
:
usize
,
pub
flags
:
Prot
Flags
,
pub
flags
:
Map
Flags
,
}
impl
Deref
for
Map
{
...
...
src/flag.rs
View file @
a0581db1
...
...
@@ -66,6 +66,11 @@ pub const FUTEX_REQUEUE: usize = 2;
bitflags!
{
pub
struct
MapFlags
:
usize
{
const
PROT_NONE
=
0x0000_0000
;
const
PROT_EXEC
=
0x0001_0000
;
const
PROT_WRITE
=
0x0002_0000
;
const
PROT_READ
=
0x0004_0000
;
const
MAP_SHARED
=
0x0001
;
const
MAP_PRIVATE
=
0x0002
;
}
...
...
@@ -128,15 +133,6 @@ bitflags! {
}
}
bitflags!
{
pub
struct
ProtFlags
:
usize
{
const
PROT_NONE
=
0x0000_0000
;
const
PROT_EXEC
=
0x0001_0000
;
const
PROT_WRITE
=
0x0002_0000
;
const
PROT_READ
=
0x0004_0000
;
}
}
pub
const
SEEK_SET
:
usize
=
0
;
pub
const
SEEK_CUR
:
usize
=
1
;
pub
const
SEEK_END
:
usize
=
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