]> git.tue.mpg.de Git - paraslash.git/commitdiff
sched: nuke "flag" field of struct task
authorAndre <maan@p133.(none)>
Mon, 5 Jun 2006 19:46:17 +0000 (21:46 +0200)
committerAndre <maan@p133.(none)>
Mon, 5 Jun 2006 19:46:17 +0000 (21:46 +0200)
It is unused. Kill PRE_ADD_TAIL and POST_ADD_TAIL too.

audiod.c
recv.c
sched.c
sched.h
stdin.c
stdout.c
write_common.c

index 709cdfe1c5f5eff0ae72ccb4b04a76054603c252..54863cb6e9eda7faadbe7cbc170249ac73ce2bf8 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -654,7 +654,6 @@ static void open_filters(int slot_num)
        s->fc->task.pre_select = filter_pre_select;
        s->fc->task.event_handler = filter_event_handler;
        s->fc->task.private_data = s->fc;
-       s->fc->task.flags = 0;
        s->fc->eof = 0;
 
        s->receiver_node->output_eof = &s->fc->eof;
@@ -789,7 +788,6 @@ static void open_receiver(int format)
        rn->task.pre_select = a->receiver->pre_select;
        rn->task.post_select = a->receiver->post_select;
        rn->task.event_handler = rn_event_handler;
-       rn->task.flags = 0;
        sprintf(rn->task.status, "%s receiver node", rn->receiver->name);
        register_task(&rn->task);
 }
@@ -998,7 +996,6 @@ static void init_audiod_task(struct task *t)
        t->post_select = audiod_post_select;
        t->event_handler = NULL;
        t->private_data = t;
-       t->flags = 0;
        sprintf(t->status, "audiod task");
 }
 
@@ -1582,7 +1579,6 @@ void signal_setup_default(struct signal_task *st)
        st->task.pre_select = signal_pre_select;
        st->task.post_select = signal_post_select;
        st->task.private_data = st;
-       st->task.flags = 0;
        sprintf(st->task.status, "signal task");
 }
 
@@ -1615,7 +1611,6 @@ static void init_command_task(struct command_task *ct)
        ct->task.post_select = command_post_select;
        ct->task.event_handler = NULL;
        ct->task.private_data = ct;
-       ct->task.flags = 0;
        ct->fd = audiod_get_socket(); /* doesn't return on errors */
        sprintf(ct->task.status, "command task");
 }
diff --git a/recv.c b/recv.c
index cf178d207d2ca400a5613fdb610cd35d7258dbc1..8639ce2b63c654fa36595adcd79a2b68fbfa79e4 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -102,7 +102,6 @@ int main(int argc, char *argv[])
        rn.task.pre_select = r->pre_select;
        rn.task.post_select = r->post_select;
        rn.task.event_handler = rn_event_handler;
-       rn.task.flags = 0;
        sprintf(rn.task.status, "receiver node");
        register_task(&rn.task);
 
diff --git a/sched.c b/sched.c
index bd98a51593593f4f345de376eee137bb7ac8a44b..27d71f67d40fd69614e7f8c19bd0f409fb175aca 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -65,17 +65,11 @@ void *register_task(struct task *t)
        PARA_INFO_LOG("registering %s (%p)\n", t->status, t);
        if (t->pre_select) {
                PARA_DEBUG_LOG("pre_select: %p\n", &t->pre_select);
-               if (t->flags & PRE_ADD_TAIL)
-                       list_add_tail(&t->pre_select_node, &pre_select_list);
-               else
-                       list_add(&t->pre_select_node, &pre_select_list);
+               list_add(&t->pre_select_node, &pre_select_list);
        }
        if (t->post_select) {
                PARA_DEBUG_LOG("post_select: %p\n", &t->pre_select);
-               if (t->flags & POST_ADD_TAIL)
-                       list_add_tail(&t->post_select_node, &post_select_list);
-               else
-                       list_add(&t->post_select_node, &post_select_list);
+               list_add(&t->post_select_node, &post_select_list);
        }
        return t;
 }
diff --git a/sched.h b/sched.h
index 0363f0d1f4f79b89bc30078e600db4fc3b66898c..632fddde19c62782aa89b5db9cc68e1f7c3b8e41 100644 (file)
--- a/sched.h
+++ b/sched.h
@@ -8,7 +8,6 @@ struct sched {
 
 struct task {
        void *private_data;
-       unsigned flags;
        int ret;
        void (*pre_select)(struct sched *s, struct task *t);
        void (*post_select)(struct sched *s, struct task *t);
@@ -18,11 +17,6 @@ struct task {
        char status[MAXLINE];
 };
 
-enum task_flags {
-       PRE_ADD_TAIL = 1,
-       POST_ADD_TAIL = 2,
-};
-
 void *register_task(struct task *t);
 void unregister_task(struct task *t);
 int sched(struct sched *s);
diff --git a/stdin.c b/stdin.c
index 22f1dd97b2bb6b18d028b890dd6b73eab73fa567..d33be3588b9211c8efa4a98991c9a6bd1b1ce2ca 100644 (file)
--- a/stdin.c
+++ b/stdin.c
@@ -47,7 +47,6 @@ void stdin_set_defaults(struct stdin_task *sit)
        sit->bufsize = 16 * 1024,
        sit->loaded = 0,
        sit->eof = 0,
-       sit->task.flags = 0,
        sit->task.pre_select = stdin_pre_select;
        sit->task.post_select = stdin_post_select;
        sit->task.event_handler = stdin_default_event_handler;
index 1c60669aa4579846d05958ea8f619ddf9d978c83..e9277d999681fd1108fe26b8ec257bf7fe972d87 100644 (file)
--- a/stdout.c
+++ b/stdout.c
@@ -52,7 +52,6 @@ void stdout_set_defaults(struct stdout_task *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;
        sot->eof = 0;
        sprintf(sot->task.status, "stdout writer");
 }
index a28a1052564ca308cf343ccb5d6f08fdebf91d92..4350c9f1730a153a89805cbe75b30508850a8476 100644 (file)
@@ -127,7 +127,6 @@ struct writer_node_group *wng_new(unsigned num_writers)
        g->written = para_calloc(num_writers * sizeof(size_t));
        g->task.private_data = g;
        g->task.post_select = wng_post_select;
-       g->task.flags = 0;
        return g;
 }