1991 } |
1991 } |
1992 } |
1992 } |
1993 |
1993 |
1994 |
1994 |
1995 // The following three initially uninitialized fields are exclusively |
1995 // The following three initially uninitialized fields are exclusively |
1996 // managed by class java.util.concurrent.ThreadLocalRandom. |
1996 // managed by class java.util.concurrent.ThreadLocalRandom. These |
|
1997 // fields are used to build the high-performance PRNGs in the |
|
1998 // concurrent code, and we can not risk accidental false sharing. |
|
1999 // Hence, the fields are isolated with @Contended. |
|
2000 |
1997 /** The current seed for a ThreadLocalRandom */ |
2001 /** The current seed for a ThreadLocalRandom */ |
|
2002 @sun.misc.Contended("tlr") |
1998 long threadLocalRandomSeed; |
2003 long threadLocalRandomSeed; |
|
2004 |
1999 /** Probe hash value; nonzero if threadLocalRandomSeed initialized */ |
2005 /** Probe hash value; nonzero if threadLocalRandomSeed initialized */ |
|
2006 @sun.misc.Contended("tlr") |
2000 int threadLocalRandomProbe; |
2007 int threadLocalRandomProbe; |
|
2008 |
2001 /** Secondary seed isolated from public ThreadLocalRandom sequence */ |
2009 /** Secondary seed isolated from public ThreadLocalRandom sequence */ |
|
2010 @sun.misc.Contended("tlr") |
2002 int threadLocalRandomSecondarySeed; |
2011 int threadLocalRandomSecondarySeed; |
2003 |
2012 |
2004 /* Some private helper methods */ |
2013 /* Some private helper methods */ |
2005 private native void setPriority0(int newPriority); |
2014 private native void setPriority0(int newPriority); |
2006 private native void stop0(Object o); |
2015 private native void stop0(Object o); |