126 |
|
* a value that is enough for common platforms. Additionally, |
127 |
|
* extra care elsewhere is taken to avoid other false/unintended |
128 |
|
* sharing and to enhance locality, including adding padding (via |
129 |
< |
* sun.misc.Contended) to Nodes, embedding "bound" as an Exchanger |
130 |
< |
* field, and reworking some park/unpark mechanics compared to |
129 |
> |
* @Contended) to Nodes, embedding "bound" as an Exchanger field, |
130 |
> |
* and reworking some park/unpark mechanics compared to |
131 |
|
* LockSupport versions. |
132 |
|
* |
133 |
|
* The arena starts out with only one used slot. We expand the |
275 |
|
|
276 |
|
/** |
277 |
|
* Nodes hold partially exchanged data, plus other per-thread |
278 |
< |
* bookkeeping. Padded via @sun.misc.Contended to reduce memory |
279 |
< |
* contention. |
278 |
> |
* bookkeeping. Padded via @Contended to reduce memory contention. |
279 |
|
*/ |
280 |
< |
@sun.misc.Contended static final class Node { |
280 |
> |
@jdk.internal.vm.annotation.Contended static final class Node { |
281 |
|
int index; // Arena index |
282 |
|
int bound; // Last recorded value of Exchanger.bound |
283 |
|
int collides; // Number of CAS failures at current bound |