Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
59ac9991
Commit
59ac9991
authored
Sep 26, 2014
by
Charles Blake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pxd for mmap & friends from "sys/mman.h" covering POSIX/Linux/BSD.
parent
fd13c811
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
0 deletions
+80
-0
Cython/Includes/posix/mman.pxd
Cython/Includes/posix/mman.pxd
+80
-0
No files found.
Cython/Includes/posix/mman.pxd
0 → 100644
View file @
59ac9991
# http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/mman.h.html
from
posix.types
cimport
off_t
,
mode_t
cdef
extern
from
"sys/mman.h"
nogil
:
enum
:
PROT_EXEC
# protection bits for mmap/mprotect
enum
:
PROT_READ
enum
:
PROT_WRITE
enum
:
PROT_NONE
enum
:
MAP_PRIVATE
# flag bits for mmap
enum
:
MAP_SHARED
enum
:
MAP_FIXED
enum
:
MAP_ANON
# These three are not in POSIX, but are
enum
:
MAP_ANONYMOUS
# fairly common in spelling/semantics
enum
:
MAP_STACK
enum
:
MAP_LOCKED
# Typically available only on Linux
enum
:
MAP_HUGETLB
enum
:
MAP_POPULATE
enum
:
MAP_NORESERVE
enum
:
MAP_GROWSDOWN
enum
:
MAP_NOCORE
# Typically available only on BSD
enum
:
MAP_NOSYNC
void
*
mmap
(
void
*
addr
,
size_t
Len
,
int
prot
,
int
flags
,
int
fd
,
off_t
off
)
int
munmap
(
void
*
addr
,
size_t
Len
)
int
mprotect
(
void
*
addr
,
size_t
Len
,
int
prot
)
enum
:
MS_ASYNC
enum
:
MS_SYNC
enum
:
MS_INVALIDATE
int
msync
(
void
*
addr
,
size_t
Len
,
int
flags
)
enum
:
POSIX_MADV_NORMAL
# POSIX advice flags
enum
:
POSIX_MADV_SEQUENTIAL
enum
:
POSIX_MADV_RANDOM
enum
:
POSIX_MADV_WILLNEED
enum
:
POSIX_MADV_DONTNEED
int
posix_madvise
(
void
*
addr
,
size_t
Len
,
int
advice
)
enum
:
MCL_CURRENT
enum
:
MCL_FUTURE
int
mlock
(
const
void
*
addr
,
size_t
Len
)
int
munlock
(
const
void
*
addr
,
size_t
Len
)
int
mlockall
(
int
flags
)
int
munlockall
()
int
shm_open
(
const
char
*
name
,
int
oflag
,
mode_t
mode
)
int
shm_unlink
(
const
char
*
name
)
# often available
enum
:
MADV_REMOVE
# pre-POSIX advice flags; often available
enum
:
MADV_DONTFORK
enum
:
MADV_DOFORK
enum
:
MADV_HWPOISON
enum
:
MADV_MERGEABLE
,
enum
:
MADV_UNMERGEABLE
int
madvise
(
void
*
addr
,
size_t
Len
,
int
advice
)
# sometimes available
int
mincore
(
void
*
addr
,
size_t
Len
,
unsigned
char
*
vec
)
# These two are Linux specific but sometimes very efficient
void
*
mremap
(
void
*
old_addr
,
size_t
old_len
,
size_t
new_len
,
int
flags
,
...)
int
remap_file_pages
(
void
*
addr
,
size_t
Len
,
int
prot
,
size_t
pgoff
,
int
flags
)
# The rare but standardized typed memory option
enum
:
POSIX_TYPED_MEM_ALLOCATE
enum
:
POSIX_TYPED_MEM_ALLOCATE_CONTIG
enum
:
POSIX_TYPED_MEM_MAP_ALLOCATABLE
int
posix_typed_mem_open
(
const
char
*
name
,
int
oflag
,
int
tflag
)
int
posix_mem_offset
(
const
void
*
addr
,
size_t
Len
,
off_t
*
off
,
size_t
*
contig_len
,
int
*
fildes
)
cdef
struct
posix_typed_mem_info
:
size_t
posix_tmi_length
int
posix_typed_mem_get_info
(
int
fildes
,
posix_typed_mem_info
*
info
)
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