CACAO
ThreadRuntime.hpp
Go to the documentation of this file.
1 /* src/threads/ThreadRuntime.hpp - thread functions specific to classpath libraries
2 
3  Copyright (C) 1996-2013
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 #ifndef THREAD_RUNTIME_HPP_
27 #define THREAD_RUNTIME_HPP_ 1
28 
29 #include "config.h"
30 #include <cstdio>
31 #include "vm/global.hpp"
32 #include "vm/types.hpp"
33 
34 struct classinfo;
35 class java_lang_Thread;
36 struct methodinfo;
37 struct threadobject;
38 
39 namespace cacao {
40 
41 struct ThreadRuntime {
48  static void setup_thread_vmdata(const java_lang_Thread& jlt, threadobject *t);
49  static void print_thread_name(const java_lang_Thread& jlt, FILE *stream);
50  static void set_javathread_state(threadobject *t, int state);
53  static void clear_heap_reference(java_lang_Thread& jlt);
54 };
55 
56 } // end namespace cacao
57 
58 #endif // THREAD_RUNTIME_HPP_
59 
60 /*
61  * These are local overrides for various environment variables in Emacs.
62  * Please do not remove this and leave it at the end of the file, where
63  * Emacs will automagically detect them.
64  * ---------------------------------------------------------------------
65  * Local variables:
66  * mode: c++
67  * indent-tabs-mode: t
68  * c-basic-offset: 4
69  * tab-width: 4
70  * End:
71  * vim:noexpandtab:sw=4:ts=4:
72  */
static threadobject * get_thread_from_object(java_handle_t *h)
static void thread_create_initial_threadgroups(java_handle_t **threadgroup_system, java_handle_t **threadgroup_main)
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
static bool invoke_thread_initializer(java_lang_Thread &jlt, threadobject *t, methodinfo *thread_method_init, java_handle_t *name, java_handle_t *group)
static void clear_heap_reference(java_lang_Thread &jlt)
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)
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()