Lines Matching refs:shift
180 uint32_t shift = 0; in ring_buffer_calc_shift() local
181 while ((1 << shift) < size) { in ring_buffer_calc_shift()
182 ++shift; in ring_buffer_calc_shift()
186 if ((1 << shift) > size) { in ring_buffer_calc_shift()
187 --shift; in ring_buffer_calc_shift()
189 return shift; in ring_buffer_calc_shift()
198 uint32_t shift = ring_buffer_calc_shift(size); in ring_buffer_view_init() local
203 v->size = (1 << shift); in ring_buffer_view_init()
204 v->mask = (1 << shift) - 1; in ring_buffer_view_init()
212 uint32_t shift = ring_buffer_calc_shift(size); in ring_buffer_init_view_only() local
215 v->size = (1 << shift); in ring_buffer_init_view_only()
216 v->mask = (1 << shift) - 1; in ring_buffer_init_view_only()