Lines Matching refs:pread
40 rbuf->pread=rbuf->pwrite=0; in dvb_ringbuffer_init()
60 return (rbuf->pread == smp_load_acquire(&rbuf->pwrite)); in dvb_ringbuffer_empty()
74 free = READ_ONCE(rbuf->pread) - rbuf->pwrite; in dvb_ringbuffer_free()
90 avail = smp_load_acquire(&rbuf->pwrite) - rbuf->pread; in dvb_ringbuffer_avail()
106 smp_store_release(&rbuf->pread, smp_load_acquire(&rbuf->pwrite)); in dvb_ringbuffer_flush()
116 smp_store_release(&rbuf->pread, 0); in dvb_ringbuffer_reset()
138 split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0; in dvb_ringbuffer_read_user()
140 if (copy_to_user(buf, rbuf->data+rbuf->pread, split)) in dvb_ringbuffer_read_user()
148 smp_store_release(&rbuf->pread, 0); in dvb_ringbuffer_read_user()
150 if (copy_to_user(buf, rbuf->data+rbuf->pread, todo)) in dvb_ringbuffer_read_user()
154 smp_store_release(&rbuf->pread, (rbuf->pread + todo) % rbuf->size); in dvb_ringbuffer_read_user()
164 split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0; in dvb_ringbuffer_read()
166 memcpy(buf, rbuf->data+rbuf->pread, split); in dvb_ringbuffer_read()
173 smp_store_release(&rbuf->pread, 0); in dvb_ringbuffer_read()
175 memcpy(buf, rbuf->data+rbuf->pread, todo); in dvb_ringbuffer_read()
178 smp_store_release(&rbuf->pread, (rbuf->pread + todo) % rbuf->size); in dvb_ringbuffer_read()
331 idx = rbuf->pread; in dvb_ringbuffer_pkt_next()
338 consumed = (idx - rbuf->pread); in dvb_ringbuffer_pkt_next()