projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
implement hcreate_r, hdestroy_r and hsearch_r
[oweals/musl.git]
/
src
/
mman
/
munmap.c
1
#include <sys/mman.h>
2
#include "syscall.h"
3
#include "libc.h"
4
5
static void dummy1(int x) { }
6
static void dummy0(void) { }
7
weak_alias(dummy1, __vm_lock);
8
weak_alias(dummy0, __vm_unlock);
9
10
int __munmap(void *start, size_t len)
11
{
12
int ret;
13
__vm_lock(-1);
14
ret = syscall(SYS_munmap, start, len);
15
__vm_unlock();
16
return ret;
17
}
18
19
weak_alias(__munmap, munmap);