diff options
Diffstat (limited to 'kern/cbuf.h')
-rw-r--r-- | kern/cbuf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kern/cbuf.h b/kern/cbuf.h index 4e9f57a9..8995fbcc 100644 --- a/kern/cbuf.h +++ b/kern/cbuf.h @@ -62,6 +62,12 @@ cbuf_size(const struct cbuf *cbuf) return cbuf->end - cbuf->start; } +static inline size_t +cbuf_avail_size(const struct cbuf *cbuf) +{ + return cbuf_capacity(cbuf) - cbuf_size(cbuf); +} + static inline void cbuf_clear(struct cbuf *cbuf) { |