mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8268164: Adopt cast notation for WorkerThread conversions
Reviewed-by: stefank, dholmes
This commit is contained in:
parent
9fc914b963
commit
58bdabcd40
4 changed files with 10 additions and 9 deletions
|
@ -103,6 +103,15 @@ 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; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue