summaryrefslogtreecommitdiff
path: root/src/mman
diff options
context:
space:
mode:
Diffstat (limited to 'src/mman')
-rw-r--r--src/mman/madvise.c2
-rw-r--r--src/mman/mlock.c2
-rw-r--r--src/mman/mlockall.c2
-rw-r--r--src/mman/mmap.c4
-rw-r--r--src/mman/mprotect.c2
-rw-r--r--src/mman/mremap.c2
-rw-r--r--src/mman/msync.c2
-rw-r--r--src/mman/munlock.c2
-rw-r--r--src/mman/munlockall.c2
-rw-r--r--src/mman/munmap.c2
10 files changed, 11 insertions, 11 deletions
diff --git a/src/mman/madvise.c b/src/mman/madvise.c
index f03647ca..f80926be 100644
--- a/src/mman/madvise.c
+++ b/src/mman/madvise.c
@@ -4,7 +4,7 @@
int __madvise(void *addr, size_t len, int advice)
{
- return syscall3(__NR_madvise, (long)addr, len, advice);
+ return syscall(SYS_madvise, addr, len, advice);
}
weak_alias(__madvise, madvise);
diff --git a/src/mman/mlock.c b/src/mman/mlock.c
index 3c7c653c..e683a44a 100644
--- a/src/mman/mlock.c
+++ b/src/mman/mlock.c
@@ -3,5 +3,5 @@
int mlock(const void *addr, size_t len)
{
- return syscall2(__NR_mlock, (long)addr, len);
+ return syscall(SYS_mlock, addr, len);
}
diff --git a/src/mman/mlockall.c b/src/mman/mlockall.c
index 782fc9db..0ba4e662 100644
--- a/src/mman/mlockall.c
+++ b/src/mman/mlockall.c
@@ -3,5 +3,5 @@
int mlockall(int flags)
{
- return syscall1(__NR_mlockall, flags);
+ return syscall(SYS_mlockall, flags);
}
diff --git a/src/mman/mmap.c b/src/mman/mmap.c
index 5be6e12d..0b092ae2 100644
--- a/src/mman/mmap.c
+++ b/src/mman/mmap.c
@@ -11,9 +11,9 @@ void *__mmap(void *start, size_t len, int prot, int flags, int fd, off_t off)
if (((long)off & 0xfff) | ((long)((unsigned long long)off>>(12 + 8*(sizeof(off_t)-sizeof(long))))))
start = (void *)-1;
#ifdef __NR_mmap2
- return (void *)syscall6(__NR_mmap2, (long)start, len, prot, flags, fd, off>>12);
+ return (void *)syscall(SYS_mmap2, start, len, prot, flags, fd, off>>12);
#else
- return (void *)syscall6(__NR_mmap, (long)start, len, prot, flags, fd, off);
+ return (void *)syscall(SYS_mmap, start, len, prot, flags, fd, off);
#endif
}
diff --git a/src/mman/mprotect.c b/src/mman/mprotect.c
index 11d5e231..1db2aea2 100644
--- a/src/mman/mprotect.c
+++ b/src/mman/mprotect.c
@@ -3,5 +3,5 @@
int mprotect(void *addr, size_t len, int prot)
{
- return syscall3(__NR_mprotect, (long)addr, len, prot);
+ return syscall(SYS_mprotect, addr, len, prot);
}
diff --git a/src/mman/mremap.c b/src/mman/mremap.c
index 78491ef4..596c45fb 100644
--- a/src/mman/mremap.c
+++ b/src/mman/mremap.c
@@ -13,7 +13,7 @@ void *__mremap(void *old_addr, size_t old_len, size_t new_len, int flags, ...)
new_addr = va_arg(ap, void *);
va_end(ap);
- return (void *)syscall5(__NR_mremap, (long)old_addr, old_len, new_len, flags, (long)new_addr);
+ return (void *)syscall(SYS_mremap, old_addr, old_len, new_len, flags, new_addr);
}
weak_alias(__mremap, mremap);
diff --git a/src/mman/msync.c b/src/mman/msync.c
index e0926470..eaf35d3b 100644
--- a/src/mman/msync.c
+++ b/src/mman/msync.c
@@ -4,5 +4,5 @@
int msync(void *start, size_t len, int flags)
{
- return syscall3(__NR_msync, (long)start, len, flags);
+ return syscall(SYS_msync, start, len, flags);
}
diff --git a/src/mman/munlock.c b/src/mman/munlock.c
index 0db59815..2cccef0c 100644
--- a/src/mman/munlock.c
+++ b/src/mman/munlock.c
@@ -3,5 +3,5 @@
int munlock(const void *addr, size_t len)
{
- return syscall2(__NR_munlock, (long)addr, len);
+ return syscall(SYS_munlock, addr, len);
}
diff --git a/src/mman/munlockall.c b/src/mman/munlockall.c
index ce3e86cc..6e9d39d6 100644
--- a/src/mman/munlockall.c
+++ b/src/mman/munlockall.c
@@ -3,5 +3,5 @@
int munlockall(void)
{
- return syscall0(__NR_munlockall);
+ return syscall(SYS_munlockall);
}
diff --git a/src/mman/munmap.c b/src/mman/munmap.c
index c9661cda..ab7da9e2 100644
--- a/src/mman/munmap.c
+++ b/src/mman/munmap.c
@@ -5,7 +5,7 @@
int __munmap(void *start, size_t len)
{
- return syscall2(__NR_munmap, (long)start, len);
+ return syscall(SYS_munmap, start, len);
}
weak_alias(__munmap, munmap);