+ /** Copied from the task_info struct during task_register(). */
+ void (*pre_select)(struct sched *s, struct task *t);
+ /** Copied from the task_info struct during task_register(). */
+ int (*post_select)(struct sched *s, struct task *t);
+ /** Whether this task is active (>=0) or in error state (<0). */
+ int error;
+ /** Position of the task in the task list of the scheduler. */
+ struct list_head node;
+ /** The task name supplied when the task was registered(). */
+ 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;
+};
+
+/** Information that must be supplied by callers of \ref task_register(). */
+struct task_info {
+ /** Used for log messages and by \ref get_task_list(). */
+ const char *name;