diff --git a/includes/sched.h b/includes/sched.h index 70056ba..12d9092 100644 --- a/includes/sched.h +++ b/includes/sched.h @@ -1,5 +1,6 @@ #pragma once +#include #include struct scheduler; @@ -24,5 +25,9 @@ static inline int sched_default_threads() { */ int sched_init(int nthreads, int qlen, taskfunc f, void *closure); -/* Enfile une nouvelle tâche (f, closure) à l'ordonanceur (s) */ +/* Enfile une nouvelle tâche (f, closure) à l'ordonanceur (s) + * + * Peut renvoyer -1 avec errno = EAGAIN quand on dépasse la capacité de + * l'ordonanceur. + * */ int sched_spawn(taskfunc f, void *closure, struct scheduler *s); diff --git a/src/sched.c b/src/sched.c index 2dc1215..cbf856b 100644 --- a/src/sched.c +++ b/src/sched.c @@ -1 +1,9 @@ #include "../includes/sched.h" + +int sched_init(int nthreads, int qlen, taskfunc f, void *closure) { + return -1; +} + +int sched_spawn(taskfunc f, void *closure, struct scheduler *s) { + return -1; +}