X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmman%2Fmunmap.c;h=91aefd407f5071e348dc020aa98c3719bb6b8931;hp=ab7da9e2013111f3d4494968361db2a8a935f812;hb=60164570111873175111cf8a5b973375e492eee9;hpb=3f39c9b3130cd6c142d358159879b799370a6663 diff --git a/src/mman/munmap.c b/src/mman/munmap.c index ab7da9e2..91aefd40 100644 --- a/src/mman/munmap.c +++ b/src/mman/munmap.c @@ -3,9 +3,18 @@ #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) { - return syscall(SYS_munmap, start, len); + int ret; + __vm_lock(-1); + ret = syscall(SYS_munmap, start, len); + __vm_unlock(); + return ret; } weak_alias(__munmap, munmap);