Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
e5a2ecf3
Commit
e5a2ecf3
authored
Aug 09, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'kirr/t' into t
* kirr/t: X Fix mlock2 build on Debian 8
parents
124688f9
c2423296
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
wcfs/internal/mm.pyx
wcfs/internal/mm.pyx
+6
-1
No files found.
wcfs/internal/mm.pyx
View file @
e5a2ecf3
...
...
@@ -33,12 +33,17 @@ cdef extern from *:
#include <unistd.h>
#include <sys/syscall.h>
static int mlock2(const void *addr, size_t len, int flags) {
#ifndef SYS_mlock2
errno = ENOSYS;
return -1;
#else
long err = syscall(SYS_mlock2, addr, len, flags);
if (err != 0) {
errno = -err;
return -1;
}
return 0;
#endif
}
#endif
#endif
...
...
@@ -62,7 +67,7 @@ cpdef enum:
MLOCK_ONFAULT
=
mman
.
MLOCK_ONFAULT
MCL_CURRENT
=
mman
.
MCL_CURRENT
MCL_FUTURE
=
mman
.
MCL_FUTURE
MCL_ONFAULT
=
mman
.
MCL_ONFAULT
#
MCL_ONFAULT = mman.MCL_ONFAULT
MADV_NORMAL
=
mman
.
MADV_NORMAL
MADV_RANDOM
=
mman
.
MADV_RANDOM
...
...
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