1 /* src/native/vm/cldc1.1/java_lang_Thread.c
3 Copyright (C) 2006, 2007 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6 Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
33 #include "native/jni.h"
35 #include "native/include/java_lang_Thread.h"
37 #include "native/vm/java_lang_Thread.h"
39 #if defined(ENABLE_THREADS)
40 # include "threads/native/threads.h"
43 #include "toolbox/logging.h"
45 #include "vm/builtin.h"
49 * Class: java/lang/Thread
50 * Method: currentThread
51 * Signature: ()Ljava/lang/Thread;
53 JNIEXPORT java_lang_Thread* JNICALL Java_java_lang_Thread_currentThread(JNIEnv *env, jclass clazz)
55 return _Jv_java_lang_Thread_currentThread();
60 * Class: java/lang/Thread
61 * Method: setPriority0
64 JNIEXPORT void JNICALL Java_java_lang_Thread_setPriority0(JNIEnv *env, java_lang_Thread *this, s4 oldPriority, s4 newPriority)
66 _Jv_java_lang_Thread_setPriority(this, newPriority);
71 * Class: java/lang/Thread
75 JNIEXPORT void JNICALL Java_java_lang_Thread_sleep(JNIEnv *env, jclass clazz, s8 millis)
77 _Jv_java_lang_Thread_sleep(millis);
82 * Class: java/lang/Thread
86 JNIEXPORT void JNICALL Java_java_lang_Thread_start0(JNIEnv *env, java_lang_Thread *this)
88 _Jv_java_lang_Thread_start(this, 0);
93 * Class: java/lang/Thread
97 JNIEXPORT s4 JNICALL Java_java_lang_Thread_isAlive(JNIEnv *env, java_lang_Thread *this)
99 return _Jv_java_lang_Thread_isAlive(this);
105 * Class: java/lang/Thread
106 * Method: activeCount
109 JNIEXPORT s4 JNICALL Java_java_lang_Thread_activeCount(JNIEnv *env, jclass clazz)
115 * Class: java/lang/Thread
116 * Method: setPriority0
119 JNIEXPORT void JNICALL Java_java_lang_Thread_setPriority0(JNIEnv *env, struct java_lang_Thread* this, s4 par1, s4 par2)
125 * Class: java/lang/Thread
129 JNIEXPORT void JNICALL Java_java_lang_Thread_interrupt0(JNIEnv *env, struct java_lang_Thread* this)
135 * Class: java/lang/Thread
136 * Method: internalExit
139 JNIEXPORT void JNICALL Java_java_lang_Thread_internalExit(JNIEnv *env, struct java_lang_Thread* this)
146 * Class: java/lang/Thread
150 JNIEXPORT void JNICALL Java_java_lang_Thread_yield(JNIEnv *env, jclass clazz)
152 #if defined(ENABLE_THREADS)
159 * These are local overrides for various environment variables in Emacs.
160 * Please do not remove this and leave it at the end of the file, where
161 * Emacs will automagically detect them.
162 * ---------------------------------------------------------------------
165 * indent-tabs-mode: t
169 * vim:noexpandtab:sw=4:ts=4: