summaryrefslogtreecommitdiff
path: root/src/mman/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mman/mmap.c')
-rw-r--r--src/mman/mmap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mman/mmap.c b/src/mman/mmap.c
index 56e39a7a..b85f25ca 100644
--- a/src/mman/mmap.c
+++ b/src/mman/mmap.c
@@ -6,10 +6,8 @@
#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);
+static void dummy(void) { }
+weak_alias(dummy, __vm_wait);
#define UNIT SYSCALL_MMAP2_UNIT
#define OFF_MASK ((-0x2000ULL << (8*sizeof(long)-1)) | (UNIT-1))
@@ -25,8 +23,7 @@ void *__mmap(void *start, size_t len, int prot, int flags, int fd, off_t off)
return MAP_FAILED;
}
if (flags & MAP_FIXED) {
- __vm_lock(-1);
- __vm_unlock();
+ __vm_wait();
}
#ifdef SYS_mmap2
return (void *)syscall(SYS_mmap2, start, len, prot, flags, fd, off/UNIT);