Paraslash Audio Streaming | |
About News Download Documentation Development |
Paraslash's scheduler. More...
#include <sched.h>
Data Fields | |
int | default_timeout |
Initial value (in milliseconds) before any pre_monitor call. More... | |
int | timeout |
The timeout (also in milliseconds) for the next iteration. More... | |
struct pollfd * | pfd |
Passed to poll(2). More... | |
unsigned | pfd_array_len |
Number of elements in the above array, passed to poll(2). More... | |
unsigned | num_pfds |
Number of fds registered for montitoring so far. More... | |
unsigned * | pidx |
Maps fds to indices of the pfd array. More... | |
unsigned | pidx_array_len |
Mumber of elements in the above pidx array. More... | |
int(* | poll_function )(struct pollfd *fds, nfds_t nfds, int timeout) |
If non-NULL, use this function instead of xpoll(). More... | |
struct list_head | task_list |
Tasks which have been registered to the scheduler. More... | |
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_monitor function which is called from the scheduler main loop before it calls poll(2). Similarly, each task must define a post_monitor function which is called after poll(2) returns.
int default_timeout |
Initial value (in milliseconds) before any pre_monitor call.
Referenced by main(), and schedule().
int timeout |
The timeout (also in milliseconds) for the next iteration.
Referenced by sched_min_delay(), sched_request_timeout(), and schedule().
struct pollfd* pfd |
Passed to poll(2).
unsigned pfd_array_len |
Number of elements in the above array, passed to poll(2).
unsigned num_pfds |
Number of fds registered for montitoring so far.
Referenced by schedule().
unsigned* pidx |
Maps fds to indices of the pfd array.
Referenced by schedule().
unsigned pidx_array_len |
Mumber of elements in the above pidx array.
Referenced by schedule().
int(* poll_function) (struct pollfd *fds, nfds_t nfds, int timeout) |
If non-NULL, use this function instead of xpoll().
Referenced by main(), and schedule().
struct list_head task_list |
Tasks which have been registered to the scheduler.
Referenced by get_task_list(), sched_shutdown(), task_notify_all(), and task_register().