Files
rr3-apk/decompiled-community/sources/kotlinx/coroutines/internal/Segment.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

51 lines
1.8 KiB
Java

package kotlinx.coroutines.internal;
import androidx.core.internal.view.SupportMenu;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import kotlin.coroutines.CoroutineContext;
import kotlinx.coroutines.NotCompleted;
/* loaded from: classes5.dex */
public abstract class Segment extends ConcurrentLinkedListNode implements NotCompleted {
public static final AtomicIntegerFieldUpdater cleanedAndPointers$FU = AtomicIntegerFieldUpdater.newUpdater(Segment.class, "cleanedAndPointers");
private volatile int cleanedAndPointers;
public final long id;
public abstract int getNumberOfSlots();
public abstract void onCancellation(int i, Throwable th, CoroutineContext coroutineContext);
public Segment(long j, Segment segment, int i) {
super(segment);
this.id = j;
this.cleanedAndPointers = i << 16;
}
@Override // kotlinx.coroutines.internal.ConcurrentLinkedListNode
public boolean isRemoved() {
return cleanedAndPointers$FU.get(this) == getNumberOfSlots() && !isTail();
}
public final boolean decPointers$kotlinx_coroutines_core() {
return cleanedAndPointers$FU.addAndGet(this, SupportMenu.CATEGORY_MASK) == getNumberOfSlots() && !isTail();
}
public final void onSlotCleaned() {
if (cleanedAndPointers$FU.incrementAndGet(this) == getNumberOfSlots()) {
remove();
}
}
public final boolean tryIncPointers$kotlinx_coroutines_core() {
int i;
AtomicIntegerFieldUpdater atomicIntegerFieldUpdater = cleanedAndPointers$FU;
do {
i = atomicIntegerFieldUpdater.get(this);
if (i == getNumberOfSlots() && !isTail()) {
return false;
}
} while (!atomicIntegerFieldUpdater.compareAndSet(this, i, 65536 + i));
return true;
}
}