mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8200123: Replace Thread.init with telescoping constructor
Reviewed-by: dholmes, mchung, plevart
This commit is contained in:
parent
200fb2b35b
commit
1cd649af57
2 changed files with 25 additions and 34 deletions
|
@ -412,11 +412,11 @@ public class LockSupport {
|
|||
/**
|
||||
* Returns the thread id for the given thread. We must access
|
||||
* this directly rather than via method Thread.getId() because
|
||||
* getId() is not final, and has been known to be overridden in
|
||||
* ways that do not preserve unique mappings.
|
||||
* getId() has been known to be overridden in ways that do not
|
||||
* preserve unique mappings.
|
||||
*/
|
||||
static final long getThreadId(Thread thread) {
|
||||
return U.getLongVolatile(thread, TID);
|
||||
return U.getLong(thread, TID);
|
||||
}
|
||||
|
||||
// Hotspot implementation via intrinsics API
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue