size += br_available_bytes(br);
return size;
}
+
+/**
+ * Return the size of the largest input queue.
+ *
+ * Iterates over all children of the given node.
+ */
+size_t btr_bytes_pending(struct btr_node *btrn)
+{
+ size_t max_size = 0;
+ struct btr_node *ch;
+
+ FOR_EACH_CHILD(ch, btrn) {
+ size_t size = btr_get_input_queue_size(ch);
+ max_size = PARA_MAX(max_size, size);
+ }
+ return max_size;
+}
void btr_del_node(struct btr_node *btrn);
void btr_add_output(char *buf, size_t size, struct btr_node *btrn);
bool btr_is_leaf_node(struct btr_node *btrn);
+size_t btr_bytes_pending(struct btr_node *btrn);