X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=ikvm-native%2Fos.c;h=65d49e2a2aeea33e77a21dc118c4b8359cec3c45;hb=831403d104705c81d2fdb98473855da2e3076311;hp=9098d269b379430202a771b1fa672be77a665be5;hpb=6b6435d1b3206b0162c37e5ecce8d9a699fe6467;p=mono.git diff --git a/ikvm-native/os.c b/ikvm-native/os.c index 9098d269b37..65d49e2a2ae 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,8 @@ } #else #include + #include + #include #include "jni.h" JNIEXPORT void* JNICALL ikvm_LoadLibrary(char* psz) @@ -80,4 +82,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