Lines Matching refs:index
111 while (PA_UNLIKELY(bq->current_read->index > bq->read_index))
119 while (PA_LIKELY(bq->current_read != NULL) && PA_UNLIKELY(bq->current_read->index + (int64_t) bq->current_read->chunk.length <= bq->read_index))
139 while (PA_UNLIKELY(bq->current_write->index + (int64_t) bq->current_write->chunk.length <= bq->write_index))
147 while (PA_LIKELY(bq->current_write != NULL) && PA_UNLIKELY(bq->current_write->index > bq->write_index))
169 end = bq->blocks_tail ? bq->blocks_tail->index + (int64_t) bq->blocks_tail->chunk.length : bq->write_index;
218 pa_assert(uchunk->index + uchunk->length <= pa_memblock_get_length(uchunk->memblock));
221 pa_assert(uchunk->index % bq->base == 0);
236 while (bq->write_index + (int64_t) chunk.length > q->index)
251 if (bq->write_index >= q->index + (int64_t) q->chunk.length)
254 else if (bq->write_index + (int64_t) chunk.length <= q->index) {
257 } else if (bq->write_index <= q->index &&
258 bq->write_index + (int64_t) chunk.length >= q->index + (int64_t) q->chunk.length) {
266 } else if (bq->write_index >= q->index) {
267 /* The write index points into this memblock, so let's
270 if (bq->write_index + (int64_t) chunk.length < q->index + (int64_t) q->chunk.length) {
284 d = (size_t) (bq->write_index + (int64_t) chunk.length - q->index);
288 p->index = q->index + (int64_t) d;
303 if (!(q->chunk.length = (size_t) (bq->write_index - q->index))) {
315 pa_assert(bq->write_index + (int64_t)chunk.length > q->index &&
316 bq->write_index + (int64_t)chunk.length < q->index + (int64_t)q->chunk.length &&
317 bq->write_index < q->index);
321 d = (size_t) (bq->write_index + (int64_t) chunk.length - q->index);
322 q->index += (int64_t) d;
323 q->chunk.index += d;
331 pa_assert(bq->write_index >= q->index + (int64_t)q->chunk.length);
332 pa_assert(!q->next || (bq->write_index + (int64_t)chunk.length <= q->next->index));
337 q->chunk.index + q->chunk.length == chunk.index &&
338 bq->write_index == q->index + (int64_t) q->chunk.length) {
345 pa_assert(!bq->blocks || (bq->write_index + (int64_t)chunk.length <= bq->blocks->index));
352 n->index = bq->write_index;
418 if (!bq->current_read || bq->current_read->index > bq->read_index) {
423 length = (size_t) (bq->current_read->index - bq->read_index);
448 chunk->index = 0;
456 pa_assert(bq->read_index >= bq->current_read->index);
457 d = bq->read_index - bq->current_read->index;
458 chunk->index += (size_t) d;
486 rchunk.index = 0;
493 rchunk.index += tchunk.length;
500 while (rchunk.index < block_size) {
502 if (!item || item->index > ri) {
507 tchunk.length = PA_MIN(tchunk.length, (size_t) (item->index - ri));
515 d = ri - item->index;
516 tchunk.index += (size_t) d;
523 rchunk.length = tchunk.length = PA_MIN(tchunk.length, block_size - rchunk.index);
526 rchunk.index += rchunk.length;
530 rchunk.index = 0;
558 p = bq->current_read->index + (int64_t) bq->current_read->chunk.length;
632 bq->write_index = (bq->blocks_tail ? bq->blocks_tail->index + (int64_t) bq->blocks_tail->chunk.length : bq->read_index) + offset;