]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - stdout.c
convert para_filter to the new scheduler
[paraslash.git] / stdout.c
index 83703055c83c54edc9a7e17b050f3ca2d076c61e..af59807047a4d1e0d1d792632b1b5e1e80b6fd25 100644 (file)
--- a/stdout.c
+++ b/stdout.c
@@ -38,3 +38,20 @@ void stdout_post_select(struct sched *s, struct task *t)
        *sot->loaded -= ret;
        t->ret = 1;
 }
+
+void stdout_default_event_handler(struct task *t)
+{
+       PARA_NOTICE_LOG("%p: %s\n", t, PARA_STRERROR(-t->ret));
+       unregister_task(t);
+}
+
+
+void stdout_set_defaults(struct stdout_task *sot)
+{
+       sot->task.private_data = sot;
+       sot->task.pre_select = stdout_pre_select;
+       sot->task.post_select = stdout_post_select;
+       sot->task.event_handler = stdout_default_event_handler;
+       sot->task.flags = 0;
+       sprintf(sot->task.status, "stdout writer");
+}