Lines Matching refs:writepos
43 cbuf->writepos = 0;
69 dropbear_assert(((2*cbuf->size)+cbuf->writepos-cbuf->readpos)%cbuf->size == cbuf->used%cbuf->size);
70 dropbear_assert(((2*cbuf->size)+cbuf->readpos-cbuf->writepos)%cbuf->size == (cbuf->size-cbuf->used)%cbuf->size);
77 if (cbuf->readpos < cbuf->writepos) {
78 return cbuf->writepos - cbuf->readpos;
87 dropbear_assert(((2*cbuf->size)+cbuf->writepos-cbuf->readpos)%cbuf->size == cbuf->used%cbuf->size);
88 dropbear_assert(((2*cbuf->size)+cbuf->readpos-cbuf->writepos)%cbuf->size == (cbuf->size-cbuf->used)%cbuf->size);
95 if (cbuf->writepos < cbuf->readpos) {
96 return cbuf->readpos - cbuf->writepos;
99 return cbuf->size - cbuf->writepos;
116 return &cbuf->data[cbuf->writepos];
126 cbuf->writepos = (cbuf->writepos + len) % cbuf->size;