Lines Matching refs:pwrite
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()
118 smp_store_release(&rbuf->pwrite, 0); in dvb_ringbuffer_reset()
187 split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0; in dvb_ringbuffer_write()
190 memcpy(rbuf->data+rbuf->pwrite, buf, split); in dvb_ringbuffer_write()
198 smp_store_release(&rbuf->pwrite, 0); in dvb_ringbuffer_write()
200 memcpy(rbuf->data+rbuf->pwrite, buf, todo); in dvb_ringbuffer_write()
202 smp_store_release(&rbuf->pwrite, (rbuf->pwrite + todo) % rbuf->size); in dvb_ringbuffer_write()
214 split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0; in dvb_ringbuffer_write_user()
217 status = copy_from_user(rbuf->data+rbuf->pwrite, buf, split); in dvb_ringbuffer_write_user()
227 smp_store_release(&rbuf->pwrite, 0); in dvb_ringbuffer_write_user()
229 status = copy_from_user(rbuf->data+rbuf->pwrite, buf, todo); in dvb_ringbuffer_write_user()
233 smp_store_release(&rbuf->pwrite, (rbuf->pwrite + todo) % rbuf->size); in dvb_ringbuffer_write_user()
241 ssize_t oldpwrite = rbuf->pwrite; in dvb_ringbuffer_pkt_write()
248 if (status < 0) rbuf->pwrite = oldpwrite; in dvb_ringbuffer_pkt_write()