Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2005-05-03 19:05:33 +0400
committerZoltan Varga <vargaz@gmail.com>2005-05-03 19:05:33 +0400
commitdc34455f9fb0f0c9497b3dd6944dc9b4be36c735 (patch)
treeb3eea0e3454e0f63c8e55e0dfdeb4841916baf8c /ikvm-native
parente47cab2ad7b1f2ec454b018d03d23790260c0ab3 (diff)
2005-05-03 Zoltan Varga <vargaz@freemail.hu>
* os.c: Update from the official version. svn path=/trunk/mono/; revision=43933
Diffstat (limited to 'ikvm-native')
-rw-r--r--ikvm-native/ChangeLog4
-rw-r--r--ikvm-native/os.c18
2 files changed, 21 insertions, 1 deletions
diff --git a/ikvm-native/ChangeLog b/ikvm-native/ChangeLog
index db5bb23fad6..851b639ebd6 100644
--- a/ikvm-native/ChangeLog
+++ b/ikvm-native/ChangeLog
@@ -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>.
diff --git a/ikvm-native/os.c b/ikvm-native/os.c
index 9098d269b37..cc90658c76a 100644
--- a/ikvm-native/os.c
+++ b/ikvm-native/os.c
@@ -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)
@@ -80,4 +81,19 @@
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