@@ -94,12 +94,12 @@ internal abstract class Segment<S : Segment<S>>(val id: Long, prev: S?, pointers
94
94
fun trySetNext (value : S ): Boolean = _next .compareAndSet(null , value)
95
95
96
96
// Pointer to the previous segment, updates in [remove] function.
97
- val prev = atomic(prev)
97
+ internal val prev = atomic(prev)
98
98
99
99
/* *
100
100
* Cleans the pointer to the previous segment.
101
101
*/
102
- fun cleanPrev () = prev.lazySet(null )
102
+ fun cleanPrev () { prev.lazySet(null ) }
103
103
104
104
/* *
105
105
* This property should return the maximal number of slots in this segment,
@@ -116,13 +116,13 @@ internal abstract class Segment<S : Segment<S>>(val id: Long, prev: S?, pointers
116
116
* there is no pointers to this segment from outside, and
117
117
* it is not a physical tail in the linked list of segments.
118
118
*/
119
- inline val removed get() = cleanedAndPointers.value == maxSlots && _next .value != = null
119
+ val removed get() = cleanedAndPointers.value == maxSlots && _next .value != = null
120
120
121
121
// increments the number of pointers if this segment is not logically removed\
122
- inline fun tryIncPointers () = cleanedAndPointers.addConditionally(1 shl POINTERS_SHIFT ) { it != maxSlots }
122
+ fun tryIncPointers () = cleanedAndPointers.addConditionally(1 shl POINTERS_SHIFT ) { it != maxSlots }
123
123
124
124
// returns `true` if this segment is logically removed after the decrement
125
- inline fun decPointers () = cleanedAndPointers.addAndGet(- (1 shl POINTERS_SHIFT )) == maxSlots
125
+ fun decPointers () = cleanedAndPointers.addAndGet(- (1 shl POINTERS_SHIFT )) == maxSlots
126
126
127
127
/* *
128
128
* This functions should be invoked on each slot clean-up;
0 commit comments