1 /* src/threads/thread-cldc11.cpp - thread functions specific to the CLDC 1.1 library
3 Copyright (C) 1996-2011
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
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.
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.
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
26 #include "thread-cldc11.hpp"
28 #include "vm/global.h"
29 #include "vm/globals.hpp"
32 #include "vm/globals.hpp"
33 #include "vm/javaobjects.hpp"
34 #include "vm/exceptions.hpp"
36 #include "threadlist.hpp"
38 #if defined(ENABLE_THREADS) && defined(WITH_JAVA_RUNTIME_LIBRARY_CLDC1_1)
40 classinfo *ThreadRuntimeCldc11::get_thread_class_from_object(java_handle_t *object) {
42 LLNI_class_get(object, c);
46 java_handle_t *ThreadRuntimeCldc11::get_vmthread_handle(const java_lang_Thread &jlt) {
47 return jlt.get_handle();
50 java_handle_t *ThreadRuntimeCldc11::get_thread_exception_handler(const java_lang_Thread &jlt)
55 methodinfo *ThreadRuntimeCldc11::get_threadgroup_remove_method(classinfo *c)
60 methodinfo *ThreadRuntimeCldc11::get_thread_init_method()
65 void ThreadRuntimeCldc11::setup_thread_vmdata(const java_lang_Thread& jlt, threadobject *t)
70 void ThreadRuntimeCldc11::print_thread_name(const java_lang_Thread& jlt, FILE *stream)
75 void ThreadRuntimeCldc11::set_javathread_state(threadobject *t, int state)
80 threadobject *ThreadRuntimeCldc11::get_threadobject_from_thread(java_handle_t *h)
85 void ThreadRuntimeCldc11::thread_create_initial_threadgroups(java_handle_t **threadgroup_system, java_handle_t **threadgroup_main)
90 bool ThreadRuntimeCldc11::invoke_thread_initializer(java_lang_Thread& jlt, threadobject *t, methodinfo *thread_method_init, java_handle_t *name, java_handle_t *group)
92 // Set the thread data-structure in the Java thread object.
95 // Call: public Thread(Ljava/lang/String;)V
96 (void) vm_call_method(thread_method_init, jlt.get_handle(), name);
98 if (exceptions_get_exception())
102 void ThreadRuntimeOpenjdk::clear_heap_reference(java_lang_Thread& jlt)
107 #endif /* ENABLE_THREADS && WITH_JAVA_RUNTIME_LIBRARY_OPENJDK */
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 * ---------------------------------------------------------------------
117 * indent-tabs-mode: t
121 * vim:noexpandtab:sw=4:ts=4: