CACAO
ThreadRuntime-cldc11.cpp
Go to the documentation of this file.
1 /* src/threads/ThreadRuntime-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 
26 #include "mm/gc.hpp"
27 #include "threads/threadlist.hpp"
28 #include "vm/globals.hpp"
29 #include "vm/global.hpp"
30 #include "vm/javaobjects.hpp"
31 #include "vm/exceptions.hpp"
32 #include "vm/vm.hpp"
33 
34 using namespace cacao;
35 
37  classinfo *c;
38  LLNI_class_get(object, c);
39  return c;
40 }
41 
43  return jlt.get_handle();
44 }
45 
47 {
48  #error unknown
49 }
50 
52 {
53  #error unknown
54 }
55 
57 {
58  #error unknown
59 }
60 
62 {
63  // Nothing to do.
64 }
65 
66 void ThreadRuntime::print_thread_name(const java_lang_Thread& jlt, FILE *stream)
67 {
68  #error unknown
69 }
70 
72 {
73  // Nothing to do.
74 }
75 
77 {
78  #error unknown
79 }
80 
82 {
83  #error unknown
84 }
85 
87 {
88  // Set the thread data-structure in the Java thread object.
89  jlt.set_vm_thread(t);
90 
91  // Call: public Thread(Ljava/lang/String;)V
92  (void) vm_call_method(thread_method_init, jlt.get_handle(), name);
93 
95  return false;
96 }
97 
98 void ThreadRuntimeOpenjdk::clear_heap_reference(java_lang_Thread& jlt)
99 {
100  // Nothing to do.
101 }
102 
103 /*
104  * These are local overrides for various environment variables in Emacs.
105  * Please do not remove this and leave it at the end of the file, where
106  * Emacs will automagically detect them.
107  * ---------------------------------------------------------------------
108  * Local variables:
109  * mode: c++
110  * indent-tabs-mode: t
111  * c-basic-offset: 4
112  * tab-width: 4
113  * End:
114  * vim:noexpandtab:sw=4:ts=4:
115  */
static threadobject * get_thread_from_object(java_handle_t *h)
virtual java_handle_t * get_handle() const
static void thread_create_initial_threadgroups(java_handle_t **threadgroup_system, java_handle_t **threadgroup_main)
typedef void(JNICALL *jvmtiEventSingleStep)(jvmtiEnv *jvmti_env
java_handle_t * vm_call_method(methodinfo *m, java_handle_t *o,...)
static java_handle_t * get_thread_exception_handler(const java_lang_Thread &jlt)
JNIEnv jclass jobject const char * name
Definition: jvmti.h:312
static void set_javathread_state(threadobject *t, int state)
static methodinfo * thread_method_init
Definition: thread.cpp:62
static java_handle_t * threadgroup_main
Definition: thread.cpp:64
#define LLNI_class_get(obj, variable)
Definition: llni.hpp:60
static bool invoke_thread_initializer(java_lang_Thread &jlt, threadobject *t, methodinfo *thread_method_init, java_handle_t *name, java_handle_t *group)
static java_handle_t * threadgroup_system
Definition: thread.cpp:63
static methodinfo * get_threadgroup_remove_method(classinfo *c)
static java_handle_t * get_vmthread_handle(const java_lang_Thread &jlt)
static void setup_thread_vmdata(const java_lang_Thread &jlt, threadobject *t)
java_handle_t * exceptions_get_exception(void)
Definition: exceptions.cpp:76
GNU Classpath java/lang/Thread.
static classinfo * get_thread_class_from_object(java_handle_t *object)
static void print_thread_name(const java_lang_Thread &jlt, FILE *stream)
static methodinfo * get_thread_init_method()