]> git.tuebingen.mpg.de Git - paraslash.git/blob - sched.h
sched: nuke "flag" field of struct task
[paraslash.git] / sched.h
1 struct sched {
2         struct timeval now, timeout;
3         int max_fileno;
4         fd_set rfds, wfds;
5         int select_ret;
6         struct timeval default_timeout;
7 };
8
9 struct task {
10         void *private_data;
11         int ret;
12         void (*pre_select)(struct sched *s, struct task *t);
13         void (*post_select)(struct sched *s, struct task *t);
14         void (*event_handler)(struct task *t);
15         struct list_head pre_select_node;
16         struct list_head post_select_node;
17         char status[MAXLINE];
18 };
19
20 void *register_task(struct task *t);
21 void unregister_task(struct task *t);
22 int sched(struct sched *s);
23 void init_sched(void);
24 char *get_task_list(void);
25 int kill_task(char *id);