diff options
author | Sven Gothel <[email protected]> | 2011-07-17 16:34:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-07-17 16:34:39 +0200 |
commit | f733203dfbd034a6b1aa3eb2cd616437c982c435 (patch) | |
tree | 4ace71d4b129870b02f962b714c9dce9f83bc294 /src/native/common/Platform.c | |
parent | ad3dc39ccfddb007c3e91acf454f804573969419 (diff) |
GlueGen proper size / alignment of primitive and compound types usage [1/2] - Preparation.
Currently GlueGen fails for type long (size) and some alignments (see package.html).
- The size and alignment values shall be queried at runtime.
- Compound alignment needs to follow the described natural alignment (also @runtime).
-
- Build
- add Linux Arm7 (EABI)
- junit test
- added compound/struct tests, pointing out the shortcomings of current impl.
- package.html
- Added alignment documentation
- remove intptr.cfg
- add GluGen types int8_t, int16_t, uint8_t, uint16_t
- move MachineDescription* into runtime
- Platform
- has runtime MachineDescription
- moved size, .. to MachineDescription
- use enums for OSType, CPUArch and CPUType defined by os.name/os.arch,
triggering exception if os/arch is not supported.
This avoids Java String comparison and conscious os/arch detection.
- MachineDescription:
- compile time instances MachineDescription32Bits, MachineDescription64Bits
- runtime queried instance MachineDescriptionRuntime
- correct size, alignment, page size, ..
Diffstat (limited to 'src/native/common/Platform.c')
-rw-r--r-- | src/native/common/Platform.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/native/common/Platform.c b/src/native/common/Platform.c deleted file mode 100644 index c385e12..0000000 --- a/src/native/common/Platform.c +++ /dev/null @@ -1,29 +0,0 @@ - -#include <jni.h> - -#include <assert.h> - -#include "com_jogamp_common_os_Platform.h" - -#if defined(_WIN32) - #include <windows.h> -#else /* assume POSIX sysconf() availability */ - #include <unistd.h> -#endif - -JNIEXPORT jint JNICALL -Java_com_jogamp_common_os_Platform_getPointerSizeInBitsImpl(JNIEnv *env, jclass _unused) { - return sizeof(void *) * 8; -} - -JNIEXPORT jlong JNICALL -Java_com_jogamp_common_os_Platform_getPageSizeImpl(JNIEnv *env, jclass _unused) { -#if defined(_WIN32) - SYSTEM_INFO si; - GetSystemInfo(&si); - return (jlong) si.dwPageSize; -#else - return (jlong) sysconf(_SC_PAGESIZE); -#endif -} - |