summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-25 23:24:53 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-25 23:24:53 +0000
commit00ef7ea7dcf941374543b052a0e1f2b955008aff (patch)
treeb22f7ed5ac338e1c7fb70753126ddc4774a6e58c /libc/sysdeps/linux/common
parent5b7f7988afbc2940d82f7f3cc7a57ae24a175d79 (diff)
Enable mlock and friends if __UCLIBC_HAS_MMU__ is defined. util-linux
needs this to compile.
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/syscalls.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index b1fe3dc98..e0aa4a91e 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -1037,10 +1037,39 @@ _syscall1(pid_t, getsid, pid_t, pid);
//#define __NR_fdatasync 148
//#define __NR__sysctl 149
+
//#define __NR_mlock 150
+#ifdef L_mlock
+#include <sys/mman.h>
+# if defined __UCLIBC_HAS_MMU__ && defined __NR_mlock
+ _syscall2(int, mlock, const void *, addr, size_t, len);
+# endif
+#endif
+
//#define __NR_munlock 151
+#ifdef L_munlock
+#include <sys/mman.h>
+# if defined __UCLIBC_HAS_MMU__ && defined __NR_munlock
+ _syscall2(int, munlock, const void *, addr, size_t, len);
+# endif
+#endif
+
//#define __NR_mlockall 152
+#ifdef L_mlockall
+#include <sys/mman.h>
+# if defined __UCLIBC_HAS_MMU__ && defined __NR_mlockall
+ _syscall1(int, mlockall, int, flags);
+# endif
+#endif
+
//#define __NR_munlockall 153
+#ifdef L_munlockall
+#include <sys/mman.h>
+# if defined __UCLIBC_HAS_MMU__ && defined L_munlockall
+ _syscall0(int, munlockall);
+# endif
+#endif
+
//#define __NR_sched_setparam 154
//#define __NR_sched_getparam 155
//#define __NR_sched_setscheduler 156