Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: java_lang_VMThread.c 8111 2007-06-20 13:51:38Z twisti $
-
*/
#include <stdint.h>
#include "native/jni.h"
+#include "native/llni.h"
#include "native/native.h"
#include "native/include/java_lang_ThreadGroup.h"
*/
JNIEXPORT int32_t JNICALL Java_java_lang_VMThread_countStackFrames(JNIEnv *env, java_lang_VMThread *this)
{
- return _Jv_java_lang_Thread_countStackFrames(this->thread);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ return _Jv_java_lang_Thread_countStackFrames(thread);
}
*/
JNIEXPORT void JNICALL Java_java_lang_VMThread_start(JNIEnv *env, java_lang_VMThread *this, int64_t stacksize)
{
- _Jv_java_lang_Thread_start(this->thread, stacksize);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ _Jv_java_lang_Thread_start(thread, stacksize);
}
*/
JNIEXPORT void JNICALL Java_java_lang_VMThread_interrupt(JNIEnv *env, java_lang_VMThread *this)
{
- _Jv_java_lang_Thread_interrupt(this->thread);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ _Jv_java_lang_Thread_interrupt(thread);
}
*/
JNIEXPORT int32_t JNICALL Java_java_lang_VMThread_isInterrupted(JNIEnv *env, java_lang_VMThread *this)
{
- return _Jv_java_lang_Thread_isInterrupted(this->thread);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ return _Jv_java_lang_Thread_isInterrupted(thread);
}
*/
JNIEXPORT void JNICALL Java_java_lang_VMThread_suspend(JNIEnv *env, java_lang_VMThread *this)
{
- _Jv_java_lang_Thread_suspend(this->thread);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ _Jv_java_lang_Thread_suspend(thread);
}
*/
JNIEXPORT void JNICALL Java_java_lang_VMThread_resume(JNIEnv *env, java_lang_VMThread *this)
{
- _Jv_java_lang_Thread_resume(this->thread);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ _Jv_java_lang_Thread_resume(thread);
}
*/
JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeSetPriority(JNIEnv *env, java_lang_VMThread *this, int32_t priority)
{
- _Jv_java_lang_Thread_setPriority(this->thread, priority);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ _Jv_java_lang_Thread_setPriority(thread, priority);
}
*/
JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeStop(JNIEnv *env, java_lang_VMThread *this, java_lang_Throwable *t)
{
- _Jv_java_lang_Thread_stop(this->thread, t);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ _Jv_java_lang_Thread_stop(thread, t);
}
*/
JNIEXPORT java_lang_String* JNICALL Java_java_lang_VMThread_getState(JNIEnv *env, java_lang_VMThread *this)
{
- return _Jv_java_lang_Thread_getState(this->thread);
+ java_lang_Thread *thread;
+
+ LLNI_field_get_ref(this, thread, thread);
+
+ return _Jv_java_lang_Thread_getState(thread);
}