mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8275035: Clean up worker thread infrastructure
Reviewed-by: stefank, ayang
This commit is contained in:
parent
3b0b6adc3d
commit
54b8870766
103 changed files with 1096 additions and 1298 deletions
|
@ -101,31 +101,6 @@ class NamedThread: public NonJavaThread {
|
|||
uint gc_id() { return _gc_id; }
|
||||
};
|
||||
|
||||
// Worker threads are named and have an id of an assigned work.
|
||||
class WorkerThread: public NamedThread {
|
||||
private:
|
||||
uint _id;
|
||||
public:
|
||||
static WorkerThread* current() {
|
||||
return WorkerThread::cast(Thread::current());
|
||||
}
|
||||
|
||||
static WorkerThread* cast(Thread* t) {
|
||||
assert(t->is_Worker_thread(), "incorrect cast to WorkerThread");
|
||||
return static_cast<WorkerThread*>(t);
|
||||
}
|
||||
|
||||
WorkerThread() : _id(0) { }
|
||||
virtual bool is_Worker_thread() const { return true; }
|
||||
|
||||
void set_id(uint work_id) { _id = work_id; }
|
||||
uint id() const { return _id; }
|
||||
|
||||
// Printing
|
||||
virtual const char* type_name() const { return "WorkerThread"; }
|
||||
|
||||
};
|
||||
|
||||
// A single WatcherThread is used for simulating timer interrupts.
|
||||
class WatcherThread: public NonJavaThread {
|
||||
friend class VMStructs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue