1 /* Copyright (c) 2010 The Regents of the University of California
2 * Barret Rhoden <brho@cs.berkeley.edu>
3 * See LICENSE for details.
5 * Struct for the BCQ. Needs to be in its own file so glibc doesn't try to
6 * include any of the atomics needed for the actual BCQ operations. */
10 #include <ros/common.h>
13 uint32_t prod_idx; /* next to be produced in */
14 uint32_t cons_pub_idx; /* last completely consumed */
15 uint32_t cons_pvt_idx; /* last a consumer has dibs on */
18 #define DEFINE_BCQ_TYPES(__name, __elem_t, __num_elems) \
20 /* Wrapper, per element, with the consumption bool */ \
21 struct __name##_bcq_wrap { \
23 bool rdy_for_cons; /* elem is ready for consumption */ \
26 /* The actual BC queue */ \
27 struct __name##_bcq { \
28 struct bcq_header hdr; \
29 struct __name##_bcq_wrap wraps[__num_elems]; \