madvice and OSF/1

From: Andrea Arcangeli (andrea@suse.de)
Date: Wed Mar 15 2000 - 13:16:48 EST


Do you know how the madvise syscall works on OSF/1? That matters to be
binary compatible.

So far I did this change to compile 2.3.99pre1 and I did that with only
the linux picture in mind (it's fine per se), but I'd much prefer to be
sure to provide binary compatibility (at least if possible).

--- 2.3.99pre1aa1-alpha/arch/alpha/kernel/osf_sys.c.~1~ Sat Mar 11 20:02:29 2000
+++ 2.3.99pre1aa1-alpha/arch/alpha/kernel/osf_sys.c Wed Mar 15 19:11:47 2000
@@ -191,14 +191,6 @@
 
 
 /*
- * Heh. As documented by DEC..
- */
-asmlinkage unsigned long sys_madvise(void)
-{
- return 0;
-}
-
-/*
  * No need to acquire the kernel lock, we're local..
  */
 asmlinkage unsigned long sys_getxuid(int a0, int a1, int a2, int a3, int a4,
--- 2.3.99pre1aa1-alpha/include/asm-alpha/mman.h.~1~ Mon Jan 18 02:27:22 1999
+++ 2.3.99pre1aa1-alpha/include/asm-alpha/mman.h Wed Mar 15 19:07:20 2000
@@ -31,6 +31,12 @@
 #define MCL_CURRENT 8192 /* lock all currently mapped pages */
 #define MCL_FUTURE 16384 /* lock all additions to address space */
 
+#define MADV_NORMAL 0x0 /* default page-in behavior */
+#define MADV_RANDOM 0x1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
+#define MADV_WILLNEED 0x3 /* pre-fault pages */
+#define MADV_DONTNEED 0x4 /* discard these pages */
+
 /* compatibility flags */
 #define MAP_ANON MAP_ANONYMOUS
 #define MAP_FILE 0

Andrea



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:34 EST