Lines Matching defs:wptr
233 uint32_t wptr, rptr;
237 /* When rptr == wptr, the buffer is empty.
238 * When rptr == wptr + 1, the buffer is full.
239 * It is always rptr that advances to the position of wptr, rather than
243 wptr = kq->pending_wptr;
249 pr_debug("wptr: %d\n", wptr);
252 available_size = (rptr + queue_size_dwords - 1 - wptr) %
263 if (wptr + packet_size_in_dwords >= queue_size_dwords) {
271 while (wptr > 0) {
272 queue_address[wptr] = kq->nop_packet;
273 wptr = (wptr + 1) % queue_size_dwords;
278 *buffer_ptr = &queue_address[wptr];
279 kq->pending_wptr = wptr + packet_size_in_dwords;