⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thread.c

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 C
字号:
/* * java.lang.Thread.c * * Copyright (c) 1996, 1997 *	Transvirtual Technologies, Inc.  All rights reserved. * * Copyright (c) 2004 *      The Kaffe.org's developers. See ChangeLog for details. * * See the file "license.terms" for information on usage and redistribution  * of this file.  */#include "config.h"#include "config-std.h"#include "gtypes.h"#include "java_lang_Thread.h"#include "java_lang_VMThread.h"#include "thread.h"#include "locks.h"#include "support.h"#include "jthread.h"#include "debug.h"struct Hjava_lang_Thread*java_lang_VMThread_currentThread(void){  return (getCurrentThread());}/* * Yield processor to another thread of the same priority. */voidjava_lang_VMThread_yield(void){  yieldThread();}/* * Start this thread running. */voidjava_lang_VMThread_start(struct Hjava_lang_VMThread* this, UNUSED jlong stacksize){  startThread(this);}/* * Change thread priority. */voidjava_lang_VMThread_nativeSetPriority(struct Hjava_lang_VMThread* this, jint prio){  setPriorityThread(this, prio);}voidjava_lang_VMThread_interrupt(struct Hjava_lang_VMThread* this){  interruptThread(this);}voidjava_lang_VMThread_finalize(struct Hjava_lang_VMThread* this){  finalizeThread(this);}jboolean java_lang_VMThread_interrupted(void){  return KTHREAD(interrupted)(KTHREAD(current)());}jboolean java_lang_VMThread_isInterrupted(Hjava_lang_VMThread *this){  return KTHREAD(is_interrupted)((jthread_t)unhand(this)->vmdata);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -