• Home
  • Raw
  • Download

Lines Matching refs:n_subbufs

166 	if (chan->n_subbufs > KMALLOC_MAX_SIZE / sizeof(size_t))  in relay_create_buf()
172 buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t), in relay_create_buf()
259 return (ready >= buf->chan->n_subbufs) ? 1 : 0; in relay_buf_full()
371 for (i = 0; i < buf->chan->n_subbufs; i++) in __relay_reset()
567 size_t n_subbufs, in relay_open() argument
575 if (!(subbuf_size && n_subbufs)) in relay_open()
577 if (subbuf_size > UINT_MAX / n_subbufs) in relay_open()
591 chan->n_subbufs = n_subbufs; in relay_open()
593 chan->alloc_size = PAGE_ALIGN(subbuf_size * n_subbufs); in relay_open()
757 old_subbuf = buf->subbufs_produced % buf->chan->n_subbufs; in relay_switch_subbuf()
780 new_subbuf = buf->subbufs_produced % buf->chan->n_subbufs; in relay_switch_subbuf()
824 if (!buf || subbufs_consumed > chan->n_subbufs) in relay_subbufs_consumed()
971 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_consume() local
985 read_subbuf = buf->subbufs_consumed % n_subbufs; in relay_file_read_consume()
989 if ((read_subbuf == buf->subbufs_produced % n_subbufs) && in relay_file_read_consume()
1003 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_avail() local
1017 if (unlikely(produced - consumed >= n_subbufs)) { in relay_file_read_avail()
1018 consumed = produced - n_subbufs + 1; in relay_file_read_avail()
1023 produced = (produced % n_subbufs) * subbuf_size + buf->offset; in relay_file_read_avail()
1024 consumed = (consumed % n_subbufs) * subbuf_size + buf->bytes_consumed; in relay_file_read_avail()
1027 produced += n_subbufs * subbuf_size; in relay_file_read_avail()
1078 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_start_pos() local
1079 size_t consumed = buf->subbufs_consumed % n_subbufs; in relay_file_read_start_pos()
1081 % (n_subbufs * subbuf_size); in relay_file_read_start_pos()
1088 read_subbuf = (read_subbuf + 1) % n_subbufs; in relay_file_read_start_pos()
1107 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_end_pos() local
1115 if (end_pos >= subbuf_size * n_subbufs) in relay_file_read_end_pos()