Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syscall
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
syscall
Commits
51f0ef28
Verified
Commit
51f0ef28
authored
Jul 29, 2019
by
jD91mZM2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement Deref for PtraceFlags
parent
a0581db1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/flag.rs
src/flag.rs
+13
-0
No files found.
src/flag.rs
View file @
51f0ef28
use
bitflags
::
bitflags
as
inner_bitflags
;
use
core
::{
mem
,
ops
::
Deref
,
slice
};
macro_rules!
bitflags
{
(
...
...
@@ -132,6 +133,18 @@ bitflags! {
const
PTRACE_FLAG_MASK
=
0x0000_0000_0000_F000
;
}
}
impl
Deref
for
PtraceFlags
{
type
Target
=
[
u8
];
fn
deref
(
&
self
)
->
&
Self
::
Target
{
// Same as to_ne_bytes but in-place
unsafe
{
slice
::
from_raw_parts
(
&
self
.bits
as
*
const
_
as
*
const
u8
,
mem
::
size_of
::
<
u64
>
()
)
}
}
}
pub
const
SEEK_SET
:
usize
=
0
;
pub
const
SEEK_CUR
:
usize
=
1
;
...
...
Write
Preview
Markdown
is supported
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