We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 575d56b commit ff5bd0bCopy full SHA for ff5bd0b
src/lib/ringbuffer.h
@@ -83,6 +83,15 @@
83
rb->array[type_name_##_mask(rb->write++)] = e; \
84
} \
85
\
86
+ __attribute__((unused)) static inline bool type_name_##_try_put_copy( \
87
+ struct type_name_ *rb, element_type_ e) \
88
+ { \
89
+ if (type_name_##_full(rb)) \
90
+ return false; \
91
+ \
92
+ rb->array[type_name_##_mask(rb->write++)] = e; \
93
+ } \
94
95
__attribute__((unused)) static inline bool type_name_##_try_put( \
96
struct type_name_ *rb, const element_type_ *e) \
97
{ \
0 commit comments