Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixmoebius
libc
Commits
d573a995
Unverified
Commit
d573a995
authored
4 years ago
by
Xavier L'Heureux
Browse files
Options
Downloads
Patches
Plain Diff
Add extra functions & constants from sys/mman.h for Redox
parent
bd5815ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/unix/redox/mod.rs
+35
-0
35 additions, 0 deletions
src/unix/redox/mod.rs
with
35 additions
and
0 deletions
src/unix/redox/mod.rs
+
35
−
0
View file @
d573a995
...
...
@@ -587,6 +587,23 @@ pub const TIOCSPGRP: ::c_ulong = 0x5410;
pub
const
TIOCGWINSZ
:
::
c_ulong
=
0x5413
;
pub
const
TIOCSWINSZ
:
::
c_ulong
=
0x5414
;
// sys/mman.h
pub
const
PROT_NONE
:
::
c_int
=
0x0000
;
pub
const
PROT_READ
:
::
c_int
=
0x0004
;
pub
const
PROT_WRITE
:
::
c_int
=
0x0002
;
pub
const
PROT_EXEC
:
::
c_int
=
0x0001
;
pub
const
MAP_SHARED
:
::
c_int
=
0x0001
;
pub
const
MAP_PRIVATE
:
::
c_int
=
0x0002
;
pub
const
MAP_ANON
:
::
c_int
=
0x0020
;
pub
const
MAP_ANONYMOUS
:
::
c_int
=
MAP_ANON
;
pub
const
MAP_FIXED
:
::
c_int
=
0x0010
;
pub
const
MAP_FAILED
:
*
mut
::
c_void
=
!
0
as
_
;
pub
const
MS_ASYNC
:
::
c_int
=
0x0001
;
pub
const
MS_INVALIDATE
:
::
c_int
=
0x0002
;
pub
const
MS_SYNC
:
::
c_int
=
0x0004
;
// sys/select.h
pub
const
FD_SETSIZE
:
usize
=
1024
;
...
...
@@ -934,6 +951,24 @@ extern "C" {
// sys/ioctl.h
pub
fn
ioctl
(
fd
:
::
c_int
,
request
:
::
c_ulong
,
...
)
->
::
c_int
;
// sys/mman.h
pub
fn
msync
(
addr
:
*
mut
::
c_void
,
len
:
::
size_t
,
flags
:
::
c_int
,
)
->
::
c_int
;
pub
fn
mprotect
(
addr
:
*
mut
::
c_void
,
len
:
::
size_t
,
prot
:
::
c_int
,
)
->
::
c_int
;
pub
fn
shm_open
(
name
:
*
const
c_char
,
oflag
:
::
c_int
,
mode
:
mode_t
,
)
->
::
c_int
;
pub
fn
shm_unlink
(
name
:
*
const
::
c_char
)
->
::
c_int
;
// sys/resource.h
pub
fn
getrlimit
(
resource
:
::
c_int
,
rlim
:
*
mut
::
rlimit
)
->
::
c_int
;
pub
fn
setrlimit
(
resource
:
::
c_int
,
rlim
:
*
const
::
rlimit
)
->
::
c_int
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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