This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[patch] mips madvise defines
- To: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- Subject: [patch] mips madvise defines
- From: Ben Collins <bcollins at debian dot org>
- Date: Mon, 26 Mar 2001 21:01:12 -0500
This was pointed out by one of the Debian mips porters. The kernel
headers were used for the values where needed, and i386's bits/mman.h was
used as a template.
2001-03-26 Ben Collins <bcollins@debian.org>
* sysdeps/unix/sysv/linux/mips/bits/mman.h: add MAP_* and
MADV_* defines to match other architectures.
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
--- sysdeps/unix/sysv/linux/mips/bits/mman.h~ 2000/02/05 07:45:59 1.5
+++ sysdeps/unix/sysv/linux/mips/bits/mman.h 2001/03/15 16:51:46
@@ -53,10 +53,12 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */
+# define MAP_NORESERVE 0x0400 /* don't check for reservations */
+# define MAP_ANONYMOUS 0x0800 /* don't use a file */
+# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */
-# define MAP_NORESERVE 0x0400 /* Don't check for reservations. */
+# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
+# define MAP_LOCKED 0x8000 /* pages are locked */
#endif
/* Flags to `msync'. */
@@ -68,6 +70,15 @@
#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
#define MCL_FUTURE 2 /* Lock all additions to address
space. */
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+#define MADV_NORMAL 0 /* default page-in behavior */
+#define MADV_RANDOM 1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */
+#define MADV_WILLNEED 3 /* pre-fault pages */
+#define MADV_DONTNEED 4 /* discard these pages */
+#endif
/* Flags for `mremap'. */
#ifdef __USE_GNU