X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=buffer_tree.c;h=1a6b6e60d3f977d2d99f600d7a872a1b95250312;hb=764e787bc065694b2e9b05159a92104d585f59eb;hp=5d8e33fc17748dc1347af4f1ec57f15a8b662741;hpb=33c1c9a440ba25e8c4c4988d8811402fb29afb0f;p=paraslash.git diff --git a/buffer_tree.c b/buffer_tree.c index 5d8e33fc..1a6b6e60 100644 --- a/buffer_tree.c +++ b/buffer_tree.c @@ -137,6 +137,17 @@ void btr_pushdown(struct btr_node *btrn) btr_pushdown_br(br, btrn); } +int btr_pushdown_one(struct btr_node *btrn) +{ + struct btr_buffer_reference *br; + + if (list_empty(&btrn->input_queue)) + return 0; + br = list_first_entry(&btrn->input_queue, struct btr_buffer_reference, node); + btr_pushdown_br(br, btrn); + return 1; +} + /* Return true if this node has no children. */ bool btr_no_children(struct btr_node *btrn) {