Lines Matching defs:count
23 * is ready, the writer adds to used the count of bytes available.
54 int count;
56 count = buf->len - buf->start;
57 if (count > buf->used)
58 count = buf->used;
59 *rsize = count;
64 * discard "count" bytes at the start position.
67 abuf_rdiscard(struct abuf *buf, int count)
70 if (count < 0 || count > buf->used) {
71 logx(0, "%s: bad count = %d", __func__, count);
75 buf->used -= count;
76 buf->start += count;
82 * advance the writer pointer by "count" bytes
85 abuf_wcommit(struct abuf *buf, int count)
88 if (count < 0 || count > (buf->len - buf->used)) {
89 logx(0, "%s: bad count = %d", __func__, count);
93 buf->used += count;
102 int end, avail, count;
108 count = buf->len - end;
109 if (count > avail)
110 count = avail;
111 *rsize = count;