Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/thread.hpp @ 2044:06f017f7daa7
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 07 Jan 2011 18:18:08 +0100 |
parents | 2d26b0046e0d fd1d227ef1b9 |
children | 91fe28b03d6a |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.hpp Wed Dec 29 20:06:41 2010 +0100 +++ b/src/share/vm/runtime/thread.hpp Fri Jan 07 18:18:08 2011 +0100 @@ -22,6 +22,37 @@ * */ +#ifndef SHARE_VM_RUNTIME_THREAD_HPP +#define SHARE_VM_RUNTIME_THREAD_HPP + +#include "memory/allocation.hpp" +#include "memory/threadLocalAllocBuffer.hpp" +#include "oops/oop.hpp" +#include "prims/jni.h" +#include "prims/jvmtiExport.hpp" +#include "runtime/frame.hpp" +#include "runtime/javaFrameAnchor.hpp" +#include "runtime/jniHandles.hpp" +#include "runtime/mutexLocker.hpp" +#include "runtime/os.hpp" +#include "runtime/osThread.hpp" +#include "runtime/park.hpp" +#include "runtime/safepoint.hpp" +#include "runtime/stubRoutines.hpp" +#include "runtime/threadLocalStorage.hpp" +#include "runtime/unhandledOops.hpp" +#include "utilities/exceptions.hpp" +#include "utilities/top.hpp" +#ifndef SERIALGC +#include "gc_implementation/g1/dirtyCardQueue.hpp" +#include "gc_implementation/g1/satbQueue.hpp" +#endif +#ifdef ZERO +#ifdef TARGET_ARCH_zero +# include "stack_zero.hpp" +#endif +#endif + class ThreadSafepointState; class ThreadProfiler; @@ -47,6 +78,8 @@ class ThreadClosure; class IdealGraphPrinter; +class WorkerThread; + // Class hierarchy // - Thread // - NamedThread @@ -258,6 +291,10 @@ virtual bool is_Watcher_thread() const { return false; } virtual bool is_ConcurrentGC_thread() const { return false; } virtual bool is_Named_thread() const { return false; } + virtual bool is_Worker_thread() const { return false; } + + // Casts + virtual WorkerThread* as_Worker_thread() const { return NULL; } virtual char* name() const { return (char*)"Unknown thread"; } @@ -597,9 +634,16 @@ private: uint _id; public: - WorkerThread() : _id(0) { } - void set_id(uint work_id) { _id = work_id; } - uint id() const { return _id; } + WorkerThread() : _id(0) { } + virtual bool is_Worker_thread() const { return true; } + + virtual WorkerThread* as_Worker_thread() const { + assert(is_Worker_thread(), "Dubious cast to WorkerThread*?"); + return (WorkerThread*) this; + } + + void set_id(uint work_id) { _id = work_id; } + uint id() const { return _id; } }; // A single WatcherThread is used for simulating timer interrupts. @@ -1518,7 +1562,25 @@ #endif // !SERIALGC // Machine dependent stuff - #include "incls/_thread_pd.hpp.incl" +#ifdef TARGET_OS_ARCH_linux_x86 +# include "thread_linux_x86.hpp" +#endif +#ifdef TARGET_OS_ARCH_linux_sparc +# include "thread_linux_sparc.hpp" +#endif +#ifdef TARGET_OS_ARCH_linux_zero +# include "thread_linux_zero.hpp" +#endif +#ifdef TARGET_OS_ARCH_solaris_x86 +# include "thread_solaris_x86.hpp" +#endif +#ifdef TARGET_OS_ARCH_solaris_sparc +# include "thread_solaris_sparc.hpp" +#endif +#ifdef TARGET_OS_ARCH_windows_x86 +# include "thread_windows_x86.hpp" +#endif + public: void set_blocked_on_compilation(bool value) { @@ -1776,3 +1838,5 @@ } }; + +#endif // SHARE_VM_RUNTIME_THREAD_HPP