12 #ifndef ROC_CORE_MPSC_QUEUE_NODE_H_
13 #define ROC_CORE_MPSC_QUEUE_NODE_H_
42 template <
class Tag =
void>
46 if (mpsc_queue_data_.
queue) {
47 roc_panic(
"mpsc node: attempt to destroy node while it's still in queue");
58 return &mpsc_queue_data_;
Base class for MpscQueue element.
static MpscQueueNode * mpsc_queue_node(MpscQueueData *data)
Get pointer to parent node from pointer to internal data.
MpscQueueData * mpsc_queue_data() const
Get pointer to internal data.
Base class for non-copyable objects.
#define ROC_CONTAINER_OF(ptr, type, member)
Cast a member of a structure out to the containing structure.
#define roc_panic(...)
Print error message and terminate program gracefully.
MpscQueue node internal data.
void * queue
Pointer to the containing queue.
MpscQueueData * next
Next list element.