about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/mman.h9
-rw-r--r--sysdeps/unix/sysv/linux/madvise.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/mman.h9
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list2
4 files changed, 20 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
index 8738e98c30..7c33f79896 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h
@@ -73,3 +73,12 @@
 #ifdef __USE_GNU
 # define MREMAP_MAYMOVE	1
 #endif
+
+/* Advice to `madvise'.  */
+#ifdef __USE_BSD
+# define MADV_NORMAL	 0	/* No further special treatment.  */
+# define MADV_RANDOM	 1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	 3	/* Will need these pages.  */
+# define MADV_DONTNEED	 4	/* Don't need these pages.  */
+#endif
diff --git a/sysdeps/unix/sysv/linux/madvise.c b/sysdeps/unix/sysv/linux/madvise.c
deleted file mode 100644
index c223184aac..0000000000
--- a/sysdeps/unix/sysv/linux/madvise.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/generic/madvise.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index 8114244053..ffe1e527d2 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
@@ -75,3 +75,12 @@
 #ifdef __USE_GNU
 # define MREMAP_MAYMOVE	1
 #endif
+
+/* Advice to `madvise'.  */
+#ifdef __USE_BSD
+# define MADV_NORMAL	 0	/* No further special treatment.  */
+# define MADV_RANDOM	 1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	 3	/* Will need these pages.  */
+# define MADV_DONTNEED	 4	/* Don't need these pages.  */
+#endif
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 7947cb6920..4ce48d44a2 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -24,6 +24,8 @@ ioperm		-	ioperm		3	ioperm
 iopl		-	iopl		1	iopl
 klogctl		EXTRA	syslog		3	klogctl
 lchown		-	lchown		3	__lchown	lchown
+madvise		-	madvise		3	madvise
+mincore		-	mincore		3	mincore
 mlock		EXTRA	mlock		2	__mlock	mlock
 mlockall	EXTRA	mlockall	1	__mlockall	mlockall
 mmap		-	mmap		6	__mmap		mmap