45 #if defined(ENABLE_HANDLES)
46 # define LLNI_WRAP(obj) ((obj) == NULL ? NULL : localref_add(obj))
47 # define LLNI_UNWRAP(hdl) ((hdl) == NULL ? NULL : (hdl)->heap_object)
48 # define LLNI_QUICKWRAP(obj) ((obj) == NULL ? NULL : &(obj))
49 # define LLNI_DIRECT(hdl) ((hdl)->heap_object)
51 # define LLNI_WRAP(obj) (obj)
52 # define LLNI_UNWRAP(hdl) (hdl)
53 # define LLNI_QUICKWRAP(obj) (obj)
54 # define LLNI_DIRECT(hdl) (hdl)
60 #define LLNI_class_get(obj, variable) \
61 (variable) = LLNI_field_direct((java_handle_t *) obj, vftbl->clazz)
70 #define LLNI_equals(obj1, obj2, result) \
71 LLNI_CRITICAL_START; \
72 (result) = LLNI_UNWRAP(obj1) == LLNI_UNWRAP(obj2); \
82 #define LLNI_classinfo_field_get(cls, field, variable) \
83 LLNI_CRITICAL_START; \
84 (variable) = LLNI_WRAP((cls)->field); \
94 #define LLNI_classinfo_field_set(cls, field, variable) \
95 LLNI_CRITICAL_START; \
96 (cls)->field = LLNI_UNWRAP(variable); \
110 #define LLNI_classinfo_wrap(classinfo) \
111 ((java_handle_t*) LLNI_WRAP(classinfo))
113 #define LLNI_classinfo_unwrap(clazz) \
114 ((classinfo *) LLNI_UNWRAP((java_handle_t *) (clazz)))
119 #define LLNI_field_direct(obj, field) (LLNI_DIRECT(obj)->field)
120 #define LLNI_vftbl_direct(obj) (LLNI_DIRECT((java_handle_t *) (obj))->vftbl)
134 #if defined(ENABLE_THREADS) && defined(ENABLE_GC_CACAO)
135 # define LLNI_CRITICAL_START llni_critical_start()
136 # define LLNI_CRITICAL_END llni_critical_end()
137 # define LLNI_CRITICAL_START_THREAD(t) llni_critical_start_thread(t)
138 # define LLNI_CRITICAL_END_THREAD(t) llni_critical_end_thread(t)
140 # define LLNI_CRITICAL_START
141 # define LLNI_CRITICAL_END
142 # define LLNI_CRITICAL_START_THREAD(t)
143 # define LLNI_CRITICAL_END_THREAD(t)
void llni_critical_end_thread(threadobject *t)
void llni_critical_start()
void llni_critical_start_thread(threadobject *t)