[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: java-nio adjustments for target/native
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: java-nio adjustments for target/native |
Date: |
Wed, 18 Jan 2006 10:00:40 +0000 |
Hi,
this makes the java-nio code make use of the target native layer.
Sorry for introducing more 'ugly' macro calls. I will rectify that when
switching to the posix layer. Then we can use shorter macro names or
even better function calls like cp_mem_alloc() or something similar. You
should consider this as a work in progress...
2006-01-18 Roman Kennke <address@hidden>
* native/jni/java-nio/gnu_java_nio_VMPipe.c:
Removed unnecessary include.
* native/jni/java-nio/gnu_java_nio_VMSelector.c:
Reorganized includes to only include sys/* headers when available.
* native/jni/java-nio/java_nio_MappedByteBufferImpl.c:
(get_pagesize): Return 0 when nothing else works.
(Java_java_nio_MappedByteBufferImpl_unmapImpl):
Replaced munmap() and strerror() with corresponding target macros.
(Java_java_nio_MappedByteBufferImpl_isLoadedImpl):
Replaced strerror() with corresponding target macro.
(Java_java_nio_MappedByteBufferImpl_forceImpl):
Replaced strerror() with corresponding target macro.
* native/jni/java-nio/java_nio_VMDirectByteBuffer.c:
(Java_java_nio_VMDirectByteBuffer_allocate):
Replaced malloc() with the corresponding target macro.
(Java_java_nio_VMDirectByteBuffer_free):
Replaced free() with the corresponding target macro.
(Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_Pointer_2IB):
Add index to pointer when assigning the value.
(Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_Pointer_2I_3BII):
Replaced memcpy with corresponding target macro. Add index when
doing the memcpy, not when fetching the pointer.
(Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_Pointer_2I_3BII):
Replaced memcpy with corresponding target macro.
(Java_java_nio_VMDirectByteBuffer_shiftDown):
Replaced memmove with the corresponding target macro.
/Roman
patch.diff
Description: Text Data
- [cp-patches] FYI: java-nio adjustments for target/native,
Roman Kennke <=