Lines Matching defs:count
23 * is ready, the writer adds to used the count of bytes available.
58 int count;
60 count = buf->len - buf->start;
61 if (count > buf->used)
62 count = buf->used;
63 *rsize = count;
68 * discard "count" bytes at the start position.
71 abuf_rdiscard(struct abuf *buf, int count)
74 if (count < 0 || count > buf->used) {
75 logx(0, "%s: bad count = %d", __func__, count);
79 buf->used -= count;
80 buf->start += count;
86 * advance the writer pointer by "count" bytes
89 abuf_wcommit(struct abuf *buf, int count)
92 if (count < 0 || count > (buf->len - buf->used)) {
93 logx(0, "%s: bad count = %d", __func__, count);
97 buf->used += count;
106 int end, avail, count;
112 count = buf->len - end;
113 if (count > avail)
114 count = avail;
115 *rsize = count;