]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - sched.h
sched: Introduce task_status().
[paraslash.git] / sched.h
diff --git a/sched.h b/sched.h
index 40524845fdaa63b898684c2d7b1abeb650f5b9b1..6a35f0e8e56a2f7fa4609ce63906d57981dbff0b 100644 (file)
--- a/sched.h
+++ b/sched.h
@@ -53,8 +53,8 @@ struct task {
        char status[255];
        /** If less than zero, the task was notified by another task. */
        int notification;
-       /** Whether the task structure should be freed in sched_shutdown(). */
-       bool owned_by_sched;
+       /** True if task is in error state and exit status has been queried. */
+       bool dead;
        /** Usually a pointer to the struct containing this task. */
        void *context;
 };
@@ -97,13 +97,14 @@ extern struct timeval *now;
 
 struct task *task_register(struct task_info *info, struct sched *s);
 void *task_context(struct task *t);
-void register_task(struct sched *s, struct task *t);
 int schedule(struct sched *s);
 void sched_shutdown(struct sched *s);
 char *get_task_list(struct sched *s);
 void task_notify(struct task *t, int err);
 void task_notify_all(struct sched *s, int err);
 int task_get_notification(const struct task *t);
+int task_status(const struct task *t);
+int task_reap(struct task **tptr);
 void sched_min_delay(struct sched *s);
 void sched_request_timeout(struct timeval *to, struct sched *s);
 void sched_request_timeout_ms(long unsigned ms, struct sched *s);