X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fthreads%2Fthread.hpp;h=0804b81f7c3172bdea73a9f87efd231d818fa03b;hb=a99db5e76512c854ef3800d53797ee54f3cd900f;hp=25f7c9b2515b7f4b5083125831ff8a4e1c447b1b;hpb=e6571845c0eb52b0f784d2b0b7a6af2233d237c4;p=cacao.git diff --git a/src/threads/thread.hpp b/src/threads/thread.hpp index 25f7c9b25..0804b81f7 100644 --- a/src/threads/thread.hpp +++ b/src/threads/thread.hpp @@ -1,6 +1,6 @@ /* src/threads/thread.hpp - machine independent thread functions - Copyright (C) 2007, 2008 + Copyright (C) 1996-2011 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -100,40 +100,6 @@ extern "C" { /* inline functions ***********************************************************/ -/* thread_get_object *********************************************************** - - Return the Java for the given thread. - - ARGUMENTS: - t ... thread - - RETURN: - the Java object - -*******************************************************************************/ - -inline static java_handle_t *thread_get_object(threadobject *t) -{ - return LLNI_WRAP(t->object); -} - - -/* threads_thread_set_object *************************************************** - - Set the Java object for the given thread. - - ARGUMENTS: - t ... thread - o ... Java object - -*******************************************************************************/ - -inline static void thread_set_object(threadobject *t, java_handle_t *o) -{ - t->object = LLNI_DIRECT(o); -} - - /* thread_get_current_object ************************************************** Return the Java object of the current thread. @@ -149,7 +115,7 @@ inline static java_handle_t *thread_get_current_object(void) java_handle_t *o; t = THREADOBJECT; - o = thread_get_object(t); + o = LLNI_WRAP(t->object); return o; } @@ -190,7 +156,7 @@ inline static bool thread_is_attached(threadobject *t) { java_handle_t *o; - o = thread_get_object(t); + o = LLNI_WRAP(t->object); return o != NULL; } @@ -287,6 +253,7 @@ void threads_mutex_join_unlock(void); void threads_impl_thread_clear(threadobject *t); void threads_impl_thread_reuse(threadobject *t); +void threads_impl_clear_heap_pointers(threadobject *t); void threads_impl_thread_start(threadobject *thread, functionptr f); void threads_yield(void); @@ -304,6 +271,14 @@ bool thread_handle_is_interrupted(java_handle_t *th); void thread_handle_interrupt(java_handle_t *th); int thread_handle_get_state(java_handle_t *th); +#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH) +#include "thread-classpath.hpp" +#elif defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK) +#include "thread-openjdk.hpp" +#elif defined(WITH_JAVA_RUNTIME_LIBRARY_CLDC1_1) +#include "thread-cldc11.hpp" +#endif + /* * These are local overrides for various environment variables in Emacs.