From f44720850c6d1459f651b44e098513789273fabb Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Sat, 21 Jun 2014 17:52:40 +0900 Subject: [PATCH] Add missing last padding / Comment --- .../src/main/java/io/netty/util/internal/MpscLinkedQueue.java | 3 +++ .../java/io/netty/util/internal/MpscLinkedQueueTailRef.java | 1 + 2 files changed, 4 insertions(+) diff --git a/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java b/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java index 959160e4f5..1b72d1bff7 100644 --- a/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java +++ b/common/src/main/java/io/netty/util/internal/MpscLinkedQueue.java @@ -69,6 +69,9 @@ final class MpscLinkedQueue extends MpscLinkedQueueTailRef implements Queu private static final long serialVersionUID = -1878402552271506449L; + long p00, p01, p02, p03, p04, p05, p06, p07; + long p30, p31, p32, p33, p34, p35, p36, p37; + // offer() occurs at the tail of the linked list. // poll() occurs at the head of the linked list. // diff --git a/common/src/main/java/io/netty/util/internal/MpscLinkedQueueTailRef.java b/common/src/main/java/io/netty/util/internal/MpscLinkedQueueTailRef.java index 38679acf93..4dd99c26aa 100644 --- a/common/src/main/java/io/netty/util/internal/MpscLinkedQueueTailRef.java +++ b/common/src/main/java/io/netty/util/internal/MpscLinkedQueueTailRef.java @@ -48,6 +48,7 @@ abstract class MpscLinkedQueueTailRef extends MpscLinkedQueuePad1 { @SuppressWarnings("unchecked") protected final MpscLinkedQueueNode getAndSetTailRef(MpscLinkedQueueNode tailRef) { + // LOCK XCHG in JDK8, a CAS loop in JDK 7/6 return (MpscLinkedQueueNode) UPDATER.getAndSet(this, tailRef); } }