* Paraslash's scheduler.
*
* Designed with KISS in mind. It maintains a list of task structures which is
- * extended when a new task is registered. Each task may define a pre_select
+ * extended when a new task is registered. Each task may define a pre_monitor
* function which is called from the scheduler main loop before it calls
- * select(). Similarly, each task must define a post_select function which is
+ * select(). Similarly, each task must define a post_monitor function which is
* called after the select call.
*
* \sa select(2), poll(2).
*/
struct sched {
- /** Initial value (in milliseconds) before any pre_select call. */
+ /** Initial value (in milliseconds) before any pre_monitor call. */
int default_timeout;
/** The timeout (also in milliseconds) for the next select call. */
int timeout;
*
* \sa \ref time.c.
*/
- void (*pre_select)(struct sched *s, void *context);
+ void (*pre_monitor)(struct sched *s, void *context);
/**
* Perform I/O on file descriptors which are ready for I/O.
*
* If this function returns a negative value, the scheduler unregisters
* the task.
*/
- int (*post_select)(struct sched *s, void *context);
+ int (*post_monitor)(struct sched *s, void *context);
/**
* This pointer is saved when the task is registered. It is passed to
- * ->pre_select() and ->post_select(). Usually this is a pointer to the
+ * ->pre_monitor() and ->post_monitor(). Usually this is a pointer to the
* struct owned by the caller which contains the task pointer.
*/
void *context;