diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-24 07:25:55 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-24 07:25:55 +0100 |
commit | c31ddfaf11320dea4828c753f48a29041643f552 (patch) | |
tree | 88b5c776170c406f90e686c347c7b9fef09d9c38 /kern/cbuf.h | |
parent | 6a69c45189d3c576cc18dfac6e426cd606831657 (diff) |
kern/{cbuf,fmt,hash,hlist,list,plist,rdxtree,shell,slist}: update from upstream
Note that this commit changes the order of some list operations without
triggering warnings.
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 4e9f57a..8995fbc 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) { |