X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=sched.c;h=8b68667bf453c481df6950ec727be3b134037f99;hp=2501b50c276ad9ec717123f945d4faa9bdd13680;hb=d1e6b28f66e243516d01916f9125baee75dd98d6;hpb=9c00a79ed817c854ed10ee6bd1b908df8dc13a2f diff --git a/sched.c b/sched.c index 2501b50c..8b68667b 100644 --- a/sched.c +++ b/sched.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2013 Andre Noll + * Copyright (C) 2006-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -36,7 +36,7 @@ static void unregister_task(struct task *t) para_strerror(-t->error)); if (t->pre_select) list_del(&t->pre_select_node); - if (t->new_post_select || t->post_select) + if (t->post_select) list_del(&t->post_select_node); } @@ -62,20 +62,13 @@ static void sched_preselect(struct sched *s) static inline void call_post_select(struct sched *s, struct task *t) { #ifndef SCHED_DEBUG - if (t->new_post_select) { - t->error = t->new_post_select(s, t); - return; - } - return t->post_select(s, t); + t->error = t->post_select(s, t); #else struct timeval t1, t2, diff; unsigned long pst; clock_get_realtime(&t1); - if (t->new_post_select) - t->error = t->new_post_select(s, t); - else - t->post_select(s, t); + t->error = t->post_select(s, t); clock_get_realtime(&t2); tv_diff(&t1, &t2, &diff); pst = tv2ms(&diff); @@ -172,10 +165,7 @@ void register_task(struct sched *s, struct task *t) PARA_DEBUG_LOG("pre_select: %p\n", &t->pre_select); list_add_tail(&t->pre_select_node, &s->pre_select_list); } - if (t->new_post_select) { - PARA_DEBUG_LOG("post_select: %p\n", &t->new_post_select); - list_add_tail(&t->post_select_node, &s->post_select_list); - } else if ((t->post_select)) { + if (t->post_select) { PARA_DEBUG_LOG("post_select: %p\n", &t->post_select); list_add_tail(&t->post_select_node, &s->post_select_list); }