projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c41fcd
)
MINOR: ring: add ring_size() to return the ring's size
author
Willy Tarreau
<w@1wt.eu>
Tue, 27 Feb 2024 17:53:40 +0000
(18:53 +0100)
committer
Willy Tarreau
<w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000
(17:34 +0000)
This is just to ease conversion so that callers stop accessing the ring's
buffer.
include/haproxy/ring.h
patch
|
blob
|
history
diff --git
a/include/haproxy/ring.h
b/include/haproxy/ring.h
index
ddcc558
..
b0add1d
100644
(file)
--- a/
include/haproxy/ring.h
+++ b/
include/haproxy/ring.h
@@
-51,6
+51,12
@@
static inline size_t ring_data(const struct ring *ring)
return b_data(&ring->buf);
}
+/* returns the allocated size in bytes for the ring */
+static inline size_t ring_size(const struct ring *ring)
+{
+ return b_size(&ring->buf);
+}
+
#endif /* _HAPROXY_RING_H */
/*