Home
last modified time | relevance | path

Searched refs:MAX_CAPACITY_MASK (Results 1 – 1 of 1) sorted by relevance

/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/internal/
DLockFreeTaskQueue.kt86 check(mask <= MAX_CAPACITY_MASK)
92 … val size: Int get() = _state.value.withState { head, tail -> (tail - head) and MAX_CAPACITY_MASK } in head()
120 … if (capacity < MIN_ADD_SPIN_CAPACITY || (tail - head) and MAX_CAPACITY_MASK > capacity shr 1) { in addLast()
126 val newTail = (tail + 1) and MAX_CAPACITY_MASK in addLast()
179 val newHead = (head + 1) and MAX_CAPACITY_MASK in removeFirstOrNull()
275 const val MAX_CAPACITY_MASK = (1 shl CAPACITY_BITS) - 1 in isClosed() constant
277 const val HEAD_MASK = MAX_CAPACITY_MASK.toLong() shl HEAD_SHIFT in isClosed()
279 const val TAIL_MASK = MAX_CAPACITY_MASK.toLong() shl TAIL_SHIFT in isClosed()