X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=sched.c;h=07703f929d15d197eda41897b6c7317f9a751750;hb=77e8ab4134501ec439f1ac7c7e1c418ac597ea48;hp=eb8d03c2bd99fdd1990d307aec977040c2611909;hpb=cdbc8067a2e27ee7f9e0d8ff11cf415603fc0558;p=paraslash.git diff --git a/sched.c b/sched.c index eb8d03c2..07703f92 100644 --- a/sched.c +++ b/sched.c @@ -62,10 +62,6 @@ static void sched_pre_monitor(struct sched *s) static void unlink_and_free_task(struct task *t) { - PARA_INFO_LOG("freeing task %s (%s)\n", t->name, t->status < 0? - para_strerror(-t->status) : - (t->status == TS_DEAD? "[dead]" : "[running]")); - list_del(&t->node); free(t->name); free(t); @@ -183,6 +179,7 @@ int task_reap(struct task **tptr) if (t->status >= 0) return 0; ret = t->status; + PARA_INFO_LOG("reaping %s (%s)\n", t->name, para_strerror(-ret)); /* * With list_for_each_entry_safe() it is only safe to remove the * _current_ list item. Since we are being called from the loop in @@ -230,7 +227,7 @@ void sched_shutdown(struct sched *s) */ struct task *task_register(struct task_info *info, struct sched *s) { - struct task *t = para_malloc(sizeof(*t)); + struct task *t = alloc(sizeof(*t)); assert(info->post_monitor);