Lines Matching refs:readpos
42 cbuf->readpos = 0; in cbuf_new()
69 dropbear_assert(((2*cbuf->size)+cbuf->writepos-cbuf->readpos)%cbuf->size == cbuf->used%cbuf->size); in cbuf_readlen()
70 …dropbear_assert(((2*cbuf->size)+cbuf->readpos-cbuf->writepos)%cbuf->size == (cbuf->size-cbuf->used… in cbuf_readlen()
77 if (cbuf->readpos < cbuf->writepos) { in cbuf_readlen()
78 return cbuf->writepos - cbuf->readpos; in cbuf_readlen()
81 return cbuf->size - cbuf->readpos; in cbuf_readlen()
87 dropbear_assert(((2*cbuf->size)+cbuf->writepos-cbuf->readpos)%cbuf->size == cbuf->used%cbuf->size); in cbuf_writelen()
88 …dropbear_assert(((2*cbuf->size)+cbuf->readpos-cbuf->writepos)%cbuf->size == (cbuf->size-cbuf->used… in cbuf_writelen()
95 if (cbuf->writepos < cbuf->readpos) { in cbuf_writelen()
96 return cbuf->readpos - cbuf->writepos; in cbuf_writelen()
107 return &cbuf->data[cbuf->readpos]; in cbuf_readptr()
137 cbuf->readpos = (cbuf->readpos + len) % cbuf->size; in cbuf_incrread()