Lines Matching refs:wpos
54 int wpos = cb->rpos + cb->count; in cbuffer_write_peek() local
59 if (wpos >= cb->size) in cbuffer_write_peek()
60 wpos -= cb->size; in cbuffer_write_peek()
62 if (wpos + avail > cb->size) in cbuffer_write_peek()
63 avail = cb->size - wpos; in cbuffer_write_peek()
65 *pbase = cb->buff + wpos; in cbuffer_write_peek()
89 int wpos = cb->rpos + cb->count; in cbuffer_write() local
96 if (wpos >= cb->size) in cbuffer_write()
97 wpos -= cb->size; in cbuffer_write()
99 … ASSERT( wpos >= 0 && wpos < cb->size, "wpos is out-of-bounds: %d (rpos=%d)", wpos, cb->rpos); in cbuffer_write()
101 if (wpos + avail > cb->size) in cbuffer_write()
102 avail = cb->size - wpos; in cbuffer_write()
107 memcpy( cb->buff + wpos, (const char*)from, avail ); in cbuffer_write()