~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/nbody-java/org_apache_harmony_luni_platform_IMemorySystem.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-06-11 15:45:24 UTC
  • mfrom: (1.2.1) (2.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130611154524-rppb3w6tixlegv4n
Tags: 1.4.7~20130611~a1eb425-1
* New snapshot release
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "xmlvm.h"
 
2
#include "org_apache_harmony_luni_platform_Endianness.h"
 
3
 
 
4
#include "org_apache_harmony_luni_platform_IMemorySystem.h"
 
5
 
 
6
__TIB_DEFINITION_org_apache_harmony_luni_platform_IMemorySystem __TIB_org_apache_harmony_luni_platform_IMemorySystem = {
 
7
    0, // classInitializationBegan
 
8
    0, // classInitialized
 
9
    -1, // initializerThreadId
 
10
    __INIT_org_apache_harmony_luni_platform_IMemorySystem, // classInitializer
 
11
    "org.apache.harmony.luni.platform.IMemorySystem", // className
 
12
    "org.apache.harmony.luni.platform", // package
 
13
    JAVA_NULL, // enclosingClassName
 
14
    JAVA_NULL, // enclosingMethodName
 
15
    JAVA_NULL, // signature
 
16
    (__TIB_DEFINITION_TEMPLATE*) &__TIB_java_lang_Object, // extends
 
17
    -1, // sizeInstance
 
18
    XMLVM_TYPE_INTERFACE};
 
19
 
 
20
JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IMemorySystem;
 
21
JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IMemorySystem_1ARRAY;
 
22
JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IMemorySystem_2ARRAY;
 
23
JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IMemorySystem_3ARRAY;
 
24
static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_ONLY;
 
25
static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_WRITE;
 
26
static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_WRITE_COPY;
 
27
 
 
28
static XMLVM_FIELD_REFLECTION_DATA __field_reflection_data[] = {
 
29
};
 
30
 
 
31
static XMLVM_METHOD_REFLECTION_DATA __method_reflection_data[] = {
 
32
};
 
33
 
 
34
void __INIT_org_apache_harmony_luni_platform_IMemorySystem()
 
35
{
 
36
    staticInitializerLock(&__TIB_org_apache_harmony_luni_platform_IMemorySystem);
 
37
 
 
38
    // While the static initializer mutex is locked, locally store the value of
 
39
    // whether class initialization began or not
 
40
    int initBegan = __TIB_org_apache_harmony_luni_platform_IMemorySystem.classInitializationBegan;
 
41
 
 
42
    // Whether or not class initialization had already began, it has begun now
 
43
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.classInitializationBegan = 1;
 
44
 
 
45
    staticInitializerUnlock(&__TIB_org_apache_harmony_luni_platform_IMemorySystem);
 
46
 
 
47
    JAVA_LONG curThreadId = (JAVA_LONG)pthread_self();
 
48
    if (initBegan) {
 
49
        if (__TIB_org_apache_harmony_luni_platform_IMemorySystem.initializerThreadId != curThreadId) {
 
50
            // Busy wait until the other thread finishes initializing this class
 
51
            while (!__TIB_org_apache_harmony_luni_platform_IMemorySystem.classInitialized) {
 
52
                // do nothing
 
53
            }
 
54
        }
 
55
    } else {
 
56
        __TIB_org_apache_harmony_luni_platform_IMemorySystem.initializerThreadId = curThreadId;
 
57
        XMLVM_CLASS_USED("org.apache.harmony.luni.platform.IMemorySystem")
 
58
        __INIT_IMPL_org_apache_harmony_luni_platform_IMemorySystem();
 
59
    }
 
60
}
 
61
 
 
62
void __INIT_IMPL_org_apache_harmony_luni_platform_IMemorySystem()
 
63
{
 
64
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.numInterfaces = 0;
 
65
    _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_ONLY = 1;
 
66
    _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_WRITE = 2;
 
67
    _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_WRITE_COPY = 4;
 
68
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.declaredFields = &__field_reflection_data[0];
 
69
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
 
70
    //__TIB_org_apache_harmony_luni_platform_IMemorySystem.methodDispatcherFunc = method_dispatcher;
 
71
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.declaredMethods = &__method_reflection_data[0];
 
72
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
 
73
 
 
74
    __CLASS_org_apache_harmony_luni_platform_IMemorySystem = XMLVM_CREATE_CLASS_OBJECT(&__TIB_org_apache_harmony_luni_platform_IMemorySystem);
 
75
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.clazz = __CLASS_org_apache_harmony_luni_platform_IMemorySystem;
 
76
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.baseType = JAVA_NULL;
 
77
    __CLASS_org_apache_harmony_luni_platform_IMemorySystem_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_apache_harmony_luni_platform_IMemorySystem);
 
78
    __CLASS_org_apache_harmony_luni_platform_IMemorySystem_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_apache_harmony_luni_platform_IMemorySystem_1ARRAY);
 
79
    __CLASS_org_apache_harmony_luni_platform_IMemorySystem_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_apache_harmony_luni_platform_IMemorySystem_2ARRAY);
 
80
 
 
81
    __TIB_org_apache_harmony_luni_platform_IMemorySystem.classInitialized = 1;
 
82
}
 
83
 
 
84
JAVA_INT org_apache_harmony_luni_platform_IMemorySystem_GET_MMAP_READ_ONLY()
 
85
{
 
86
    XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IMemorySystem)
 
87
    return _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_ONLY;
 
88
}
 
89
 
 
90
void org_apache_harmony_luni_platform_IMemorySystem_PUT_MMAP_READ_ONLY(JAVA_INT v)
 
91
{
 
92
    _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_ONLY = v;
 
93
}
 
94
 
 
95
JAVA_INT org_apache_harmony_luni_platform_IMemorySystem_GET_MMAP_READ_WRITE()
 
96
{
 
97
    XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IMemorySystem)
 
98
    return _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_WRITE;
 
99
}
 
100
 
 
101
void org_apache_harmony_luni_platform_IMemorySystem_PUT_MMAP_READ_WRITE(JAVA_INT v)
 
102
{
 
103
    _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_READ_WRITE = v;
 
104
}
 
105
 
 
106
JAVA_INT org_apache_harmony_luni_platform_IMemorySystem_GET_MMAP_WRITE_COPY()
 
107
{
 
108
    XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IMemorySystem)
 
109
    return _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_WRITE_COPY;
 
110
}
 
111
 
 
112
void org_apache_harmony_luni_platform_IMemorySystem_PUT_MMAP_WRITE_COPY(JAVA_INT v)
 
113
{
 
114
    _STATIC_org_apache_harmony_luni_platform_IMemorySystem_MMAP_WRITE_COPY = v;
 
115
}
 
116