X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=stdout.c;h=ba5f19670fce6c3c04d256a2056477064f5df7d3;hb=4ce5b6570ed83ef2ab5296f369f147593507286b;hp=4af40984b909121460344a53a855a5753c10c4d0;hpb=bb899fb1a0c279a2890ff30d11bf7aec50fb92ed;p=paraslash.git diff --git a/stdout.c b/stdout.c index 4af40984..ba5f1967 100644 --- a/stdout.c +++ b/stdout.c @@ -10,8 +10,8 @@ #include "stdout.h" #include "buffer_tree.h" -/* Add STDOUT_FILENO to the write fd set if there is input data available. */ -static void stdout_pre_select(struct sched *s, void *context) +/* Monitor STDOUT_FILENO if there is input data available. */ +static void stdout_pre_monitor(struct sched *s, void *context) { struct stdout_task *sot = context; int ret; @@ -24,10 +24,10 @@ static void stdout_pre_select(struct sched *s, void *context) } /* - * This function writes input data from the buffer tree to stdout if - * STDOUT_FILENO is writable. + * If input from the buffer tree is available and STDOUT_FILENO is ready, write + * as much as possible. */ -static int stdout_post_select(struct sched *s, void *context) +static int stdout_post_monitor(struct sched *s, void *context) { struct stdout_task *sot = context; struct btr_node *btrn = sot->btrn; @@ -79,8 +79,8 @@ void stdout_task_register(struct stdout_task *sot, struct sched *s) { int ret; struct task_info ti = { - .pre_select = stdout_pre_select, - .post_select = stdout_post_select, + .pre_monitor = stdout_pre_monitor, + .post_monitor = stdout_post_monitor, .context = sot, .name = "stdout", };