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