projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add creal/cimag macros in complex.h (and use them in the functions defs)
[musl]
/
src
/
mman
/
munmap.c
diff --git
a/src/mman/munmap.c
b/src/mman/munmap.c
index
c9661cd
..
91aefd4
100644
(file)
--- a/
src/mman/munmap.c
+++ b/
src/mman/munmap.c
@@
-3,9
+3,18
@@
#include "syscall.h"
#include "libc.h"
#include "syscall.h"
#include "libc.h"
+static void dummy1(int x) { }
+static void dummy0(void) { }
+weak_alias(dummy1, __vm_lock);
+weak_alias(dummy0, __vm_unlock);
+
int __munmap(void *start, size_t len)
{
int __munmap(void *start, size_t len)
{
- return syscall2(__NR_munmap, (long)start, len);
+ int ret;
+ __vm_lock(-1);
+ ret = syscall(SYS_munmap, start, len);
+ __vm_unlock();
+ return ret;
}
weak_alias(__munmap, munmap);
}
weak_alias(__munmap, munmap);