X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=sched.c;h=bc301778f9a8c20d567db31b1b19f4c413fc0ed3;hp=ad3641a37d90deacf8fdf8d4d8bd08fc94a6536e;hb=534a94f441767947874cb15d18211edf758e9277;hpb=06cf1943be32153d075ea90a5da12ac93ab2e90a diff --git a/sched.c b/sched.c index ad3641a3..bc301778 100644 --- a/sched.c +++ b/sched.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2014 Andre Noll + * Copyright (C) 2006 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -50,12 +50,6 @@ struct task { static struct timeval now_struct; const struct timeval *now = &now_struct; -static inline bool timeout_is_zero(struct sched *s) -{ - struct timeval *tv = &s->select_timeout; - return tv->tv_sec == 0 && tv->tv_usec == 0; -} - static void sched_preselect(struct sched *s) { struct task *t, *tmp; @@ -72,7 +66,10 @@ static void sched_preselect(struct sched *s) static void unlink_and_free_task(struct task *t) { - PARA_INFO_LOG("freeing task %s\n", t->name); + 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);