[MEDIUM] minor update to the task api: let the scheduler queue itself
All the tasks callbacks had to requeue the task themselves, and update
a global timeout. This was not convenient at all. Now the API has been
simplified. The tasks callbacks only have to update their expire timer,
and return either a pointer to the task or NULL if the task has been
deleted. The scheduler will take care of requeuing the task at the
proper place in the wait queue.
diff --git a/include/proto/checks.h b/include/proto/checks.h
index 8499175..6f0aa8b 100644
--- a/include/proto/checks.h
+++ b/include/proto/checks.h
@@ -2,7 +2,7 @@
include/proto/checks.h
Functions prototypes for the checks.
- Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
+ Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,7 @@
#include <types/task.h>
#include <common/config.h>
-void process_chk(struct task *t, struct timeval *next);
+struct task *process_chk(struct task *t);
int start_checks();
#endif /* _PROTO_CHECKS_H */