Home
last modified time | relevance | path

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

/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/bounded/
H A Darray.rs29 const INDEX_SHIFT: usize = 1; const
82 let index = (tail >> INDEX_SHIFT) % self.capacity; in prepare_send()
89 if (tail >> INDEX_SHIFT) == node_index { in prepare_send()
92 tail.wrapping_add(1 << INDEX_SHIFT), in prepare_send()
202 let tail = self.tail.load(Acquire) >> INDEX_SHIFT; in len()
243 let index = (tail >> INDEX_SHIFT) % self.array.capacity; in poll()
247 if (tail >> INDEX_SHIFT) == node_index || tail & CLOSED == CLOSED { in poll()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/unbounded/
H A Dqueue.rs30 const INDEX_SHIFT: usize = 1; const
139 self.tail.index.fetch_add(1 << INDEX_SHIFT, Release); in send_inner()
158 let index = (tail >> INDEX_SHIFT) % (CAPACITY + 1); in send()
171 .compare_exchange(tail, tail + (1 << INDEX_SHIFT), AcqRel, Acquire) in send()
248 let mut tail = self.tail.index.load(Acquire) >> INDEX_SHIFT; in len()
262 let tail_index = self.tail.index.load(Acquire) >> INDEX_SHIFT; in drop()