* src/threads/thread.cpp: Break a reference cycle.
[cacao.git] / src / threads / thread-cldc11.cpp
1 /* src/threads/thread-cldc11.cpp - thread functions specific to the CLDC 1.1 library
2
3    Copyright (C) 1996-2011
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #include "thread-cldc11.hpp"
27
28 #include "vm/global.h"
29 #include "vm/globals.hpp"
30
31 #include "mm/gc.hpp"
32 #include "vm/globals.hpp"
33 #include "vm/javaobjects.hpp"
34 #include "vm/exceptions.hpp"
35
36 #include "threadlist.hpp"
37
38 #if defined(ENABLE_THREADS) && defined(WITH_JAVA_RUNTIME_LIBRARY_CLDC1_1)
39
40 classinfo *ThreadRuntimeCldc11::get_thread_class_from_object(java_handle_t *object) {
41         classinfo *c;
42         LLNI_class_get(object, c);
43         return c;
44 }
45
46 java_handle_t *ThreadRuntimeCldc11::get_vmthread_handle(const java_lang_Thread &jlt) {
47         return jlt.get_handle();
48 }
49
50 java_handle_t *ThreadRuntimeCldc11::get_thread_exception_handler(const java_lang_Thread &jlt)
51 {
52         #error unknown
53 }
54
55 methodinfo *ThreadRuntimeCldc11::get_threadgroup_remove_method(classinfo *c)
56 {
57         #error unknown
58 }
59
60 methodinfo *ThreadRuntimeCldc11::get_thread_init_method()
61 {
62         #error unknown
63 }
64
65 void ThreadRuntimeCldc11::setup_thread_vmdata(const java_lang_Thread& jlt, threadobject *t)
66 {
67         // Nothing to do.
68 }
69
70 void ThreadRuntimeCldc11::print_thread_name(const java_lang_Thread& jlt, FILE *stream)
71 {
72         #error unknown
73 }
74
75 void ThreadRuntimeCldc11::set_javathread_state(threadobject *t, int state)
76 {
77         // Nothing to do.
78 }
79
80 threadobject *ThreadRuntimeCldc11::get_threadobject_from_thread(java_handle_t *h)
81 {
82         #error unknown
83 }
84
85 void ThreadRuntimeCldc11::thread_create_initial_threadgroups(java_handle_t **threadgroup_system, java_handle_t **threadgroup_main)
86 {
87         #error unknown
88 }
89
90 bool ThreadRuntimeCldc11::invoke_thread_initializer(java_lang_Thread& jlt, threadobject *t, methodinfo *thread_method_init, java_handle_t *name, java_handle_t *group)
91 {
92         // Set the thread data-structure in the Java thread object.
93         jlt.set_vm_thread(t);
94
95         // Call: public Thread(Ljava/lang/String;)V
96         (void) vm_call_method(thread_method_init, jlt.get_handle(), name);
97
98         if (exceptions_get_exception())
99                 return false;
100 }
101
102 void ThreadRuntimeOpenjdk::clear_heap_reference(java_lang_Thread& jlt)
103 {
104         // Nothing to do.
105 }
106
107 #endif /* ENABLE_THREADS && WITH_JAVA_RUNTIME_LIBRARY_OPENJDK */
108
109
110 /*
111  * These are local overrides for various environment variables in Emacs.
112  * Please do not remove this and leave it at the end of the file, where
113  * Emacs will automagically detect them.
114  * ---------------------------------------------------------------------
115  * Local variables:
116  * mode: c++
117  * indent-tabs-mode: t
118  * c-basic-offset: 4
119  * tab-width: 4
120  * End:
121  * vim:noexpandtab:sw=4:ts=4:
122  */