paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Data Fields
sched Struct Reference

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...
 

Detailed Description

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.

See also
select(2), poll(2).

Field Documentation

◆ default_timeout

int default_timeout

Initial value (in milliseconds) before any pre_monitor call.

Referenced by main(), and schedule().

◆ timeout

int timeout

The timeout (also in milliseconds) for the next iteration.

Referenced by sched_min_delay(), sched_request_timeout(), and schedule().

◆ pfd

struct pollfd* pfd

Passed to poll(2).

◆ pfd_array_len

unsigned pfd_array_len

Number of elements in the above array, passed to poll(2).

◆ num_pfds

unsigned num_pfds

Number of fds registered for montitoring so far.

Referenced by schedule().

◆ pidx

unsigned* pidx

Maps fds to indices of the pfd array.

Referenced by schedule().

◆ pidx_array_len

unsigned pidx_array_len

Mumber of elements in the above pidx array.

Referenced by schedule().

◆ poll_function

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().

◆ task_list

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().


The documentation for this struct was generated from the following file: