rtask.h File Reference

Recurrent task module. More...

#include <cfg/compiler.h>

Go to the source code of this file.


Detailed Description

Recurrent task module.

This module is a convenient method to handle multiple recurrent low priority tasks. It creates a process with the default priority and schedules all the tasks internally. You can execute all the operations you want in each callback, since they are executed in a different thread from the caller.

Your callback may return true if you want the task to be scheduled again, or false if you want the task to end.

Interval time for each task should be fairly high (>20 ms) to avoid blocking the whole CPU on this low priority job.

Note:
rtask_add() may block.
Author:
Luca Ottaviano <lottaviano@develer.com>
Francesco Sacchi <batt@develer.com>

Definition in file rtask.h.