Lines Matching refs:used
41 cbuf->used = 0; in cbuf_new()
57 return cbuf->used; in cbuf_getused()
63 return cbuf->size - cbuf->used; in cbuf_getavail()
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()
72 if (cbuf->used == 0) { in cbuf_readlen()
86 dropbear_assert(cbuf->used <= cbuf->size); in cbuf_writelen()
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()
90 if (cbuf->used == cbuf->size) { in cbuf_writelen()
124 cbuf->used += len; in cbuf_incrwrite()
125 dropbear_assert(cbuf->used <= cbuf->size); in cbuf_incrwrite()
135 dropbear_assert(cbuf->used >= len); in cbuf_incrread()
136 cbuf->used -= len; in cbuf_incrread()