X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=sched.h;h=f15e4efb666738d5f12da542e3ae10c3d774132e;hp=021474a21a5303d405d91b985a0a70de1d198801;hb=f840be8ddc43e321b07edf24eafeab5bc5bc57ef;hpb=24758c5f17064273786e704b84ceff56c234e347 diff --git a/sched.h b/sched.h index 021474a2..f15e4efb 100644 --- a/sched.h +++ b/sched.h @@ -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. */ @@ -41,10 +41,7 @@ struct sched { * Before registering a task to the scheduler, the task structure must be * filled in properly by the caller. * - * If one of these functions sets \a t->error to a negative value, the - * task gets unregistered automatically. - * - * \sa struct sched. + * \sa \ref sched. */ struct task { /** @@ -55,11 +52,13 @@ struct task { */ void (*pre_select)(struct sched *s, struct task *t); /** - * The postselect hook of \a t. + * The post select hook of \a t. * - * Evaluate and act upon the results of the previous select call. + * Its purpose is to evaluate and act upon the results of the previous + * select call. If this function returns a negative value, the + * scheduler unregisters the task. */ - void (*post_select)(struct sched *s, struct task *t); + int (*post_select)(struct sched *s, struct task *t); /** Whether this task is in error state. */ int error; /** Position of the task in the pre_select list of the scheduler. */