2005-05-03 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Tue, 3 May 2005 15:05:33 +0000 (15:05 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 3 May 2005 15:05:33 +0000 (15:05 -0000)
* os.c: Update from the official version.

svn path=/trunk/mono/; revision=43933

ikvm-native/ChangeLog
ikvm-native/os.c

index db5bb23fad65af39000d84d8c58bded373ba6ed1..851b639ebd6ac7c2168c632baf9490687ff3b15c 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-03  Zoltan Varga  <vargaz@freemail.hu>
+
+       * os.c: Update from the official version.
+
 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
 
        * jni.c: Applied some freebsd patches from Bill Middleton <flashdict@gmail.com>.
index 9098d269b379430202a771b1fa672be77a665be5..cc90658c76ad7e58d5a7355d2ae16a8e842d8e5a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 Jeroen Frijters
+  Copyright (C) 2004, 2005 Jeroen Frijters
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -57,6 +57,7 @@
        }
 #else
        #include <gmodule.h>
+       #include <sys/mman.h>
        #include "jni.h"
 
        JNIEXPORT void* JNICALL ikvm_LoadLibrary(char* psz)
                else
                        return NULL;
        }
+
+       JNIEXPORT void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size)
+       {
+               return mmap(0, size, writeable ? PROT_WRITE | PROT_READ : PROT_READ, copy_on_write ? MAP_PRIVATE : MAP_SHARED, fd, position);
+       }
+
+       JNIEXPORT int JNICALL ikvm_munmap(void* address, jint size)
+       {
+               return munmap(address, size);
+       }
+
+       JNIEXPORT int JNICALL ikvm_msync(void* address, jint size)
+       {
+               return msync(address, size, MS_SYNC);
+       }
 #endif