projects
/
libusual.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f5400f
)
mbuf: mbuf_consumed() function
author
Marko Kreen
<markokr@gmail.com>
Sat, 7 Jul 2012 15:19:30 +0000
(18:19 +0300)
committer
Marko Kreen
<markokr@gmail.com>
Sat, 7 Jul 2012 15:19:30 +0000
(18:19 +0300)
usual/mbuf.h
patch
|
blob
|
blame
|
history
diff --git
a/usual/mbuf.h
b/usual/mbuf.h
index a8f8644bb90f6c24119fd76c8fe72c189b36cead..56a047d6f1b94d41c9b7940bf39599f82987bb46 100644
(file)
--- a/
usual/mbuf.h
+++ b/
usual/mbuf.h
@@
-115,6
+115,12
@@
static inline unsigned mbuf_written(const struct MBuf *buf)
return buf->write_pos;
}
+/** How many bytes have been read from buffer */
+static inline unsigned mbuf_consumed(const struct MBuf *buf)
+{
+ return buf->read_pos;
+}
+
/** Return pointer to data area. */
static inline const void *mbuf_data(const struct MBuf *buf)
{