109 |
|
throw new Error(e); |
110 |
|
} |
111 |
|
} |
112 |
< |
|
112 |
> |
|
113 |
|
} |
114 |
|
|
115 |
|
/** |
124 |
|
code = (h == 0) ? 1 : h; |
125 |
|
} |
126 |
|
} |
127 |
< |
|
127 |
> |
|
128 |
|
/** |
129 |
|
* The corresponding ThreadLocal class |
130 |
|
*/ |
140 |
|
*/ |
141 |
|
static final ThreadHashCode threadHashCode = new ThreadHashCode(); |
142 |
|
|
143 |
< |
/** Nomber of CPUS, to place bound on table size */ |
143 |
> |
/** Number of CPUS, to place bound on table size */ |
144 |
|
static final int NCPU = Runtime.getRuntime().availableProcessors(); |
145 |
|
|
146 |
|
/** |
150 |
|
|
151 |
|
/** |
152 |
|
* Base value, used mainly when there is no contention, but also as |
153 |
< |
* a fallback during table initializion races. Updated via CAS. |
153 |
> |
* a fallback during table initialization races. Updated via CAS. |
154 |
|
*/ |
155 |
|
transient volatile long base; |
156 |
|
|
238 |
|
collide = false; // At max size or stale |
239 |
|
else if (!collide) |
240 |
|
collide = true; |
241 |
< |
else if (busy == 0 && casBusy()) { |
241 |
> |
else if (busy == 0 && casBusy()) { |
242 |
|
try { |
243 |
|
if (cells == as) { // Expand table unless stale |
244 |
|
Cell[] rs = new Cell[n << 1]; |
293 |
|
} |
294 |
|
} |
295 |
|
} |
296 |
< |
|
296 |
> |
|
297 |
|
// Unsafe mechanics |
298 |
|
private static final sun.misc.Unsafe UNSAFE; |
299 |
|
private static final long baseOffset; |
339 |
|
} |
340 |
|
} |
341 |
|
|
342 |
< |
} |
342 |
> |
} |