Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

bgtask Struct Reference


Detailed Description

Internal representation of a user-defined task.

`step' is the current processing step. Several processing steps can be recorded during the task creation. It is an index in the step array, which determines which call will be made at the next scheduling tick.

`seqno' is maintained by the scheduler and counts the amount of calls made for the given step. It is reset each time the user changes the processing step.

`stepvec' is the set of steps we have to run (normally in sequence).


Data Fields

guint magic
 Magic number.

guint32 flags
 Operating flags.

gchar * name
 Task name.

gint step
 Current processing step.

gint seqno
 Number of calls at same step.

bgstep_cb_tstepvec
 Set of steps to run in sequence.

gint stepcnt
 Amount of steps in the `stepvec' array.

gpointer ucontext
 User context.

time_t ctime
 Creation time.

gint wtime
 Wall-clock run time sofar, in ms.

bgclean_cb_t uctx_free
 Free routine for context.

bgdone_cb_t done_cb
 Called when done.

gpointer done_arg
 "done" callback argument

gint exitcode
 Final "exit" code.

bgsig_t signal
 Last signal delivered.

GSList * signals
 List of signals pending delivery.

jmp_buf env
 Only valid when TASK_F_RUNNING.

tm_t start
 Start time of scheduling "tick".

gint ticks
 Scheduling ticks for time slice.

gint ticks_used
 Amount of ticks used by processing step.

gint prev_ticks
 Ticks used when measuring `elapsed' below.

gint elapsed
 Elapsed during last run, in usec.

gdouble tick_cost
 Time in ms.

bgsig_cb_t sigh [BG_SIG_COUNT]
 Signal handlers.

GSList * wq
 Work queue (daemon task only).

bgstart_cb_t start_cb
 Called when starting working on an item.

bgend_cb_t end_cb
 Called when finished working on an item.

bgclean_cb_t item_free
 Free routine for work queue items.

bgnotify_cb_t notify
 Start/Stop notification (optional).


Field Documentation

time_t bgtask::ctime
 

Creation time.

gpointer bgtask::done_arg
 

"done" callback argument

bgdone_cb_t bgtask::done_cb
 

Called when done.

gint bgtask::elapsed
 

Elapsed during last run, in usec.

bgend_cb_t bgtask::end_cb
 

Called when finished working on an item.

jmp_buf bgtask::env
 

Only valid when TASK_F_RUNNING.

gint bgtask::exitcode
 

Final "exit" code.

guint32 bgtask::flags
 

Operating flags.

bgclean_cb_t bgtask::item_free
 

Free routine for work queue items.

guint bgtask::magic
 

Magic number.

gchar* bgtask::name
 

Task name.

bgnotify_cb_t bgtask::notify
 

Start/Stop notification (optional).

gint bgtask::prev_ticks
 

Ticks used when measuring `elapsed' below.

gint bgtask::seqno
 

Number of calls at same step.

bgsig_cb_t bgtask::sigh[BG_SIG_COUNT]
 

Signal handlers.

bgsig_t bgtask::signal
 

Last signal delivered.

GSList* bgtask::signals
 

List of signals pending delivery.

tm_t bgtask::start
 

Start time of scheduling "tick".

bgstart_cb_t bgtask::start_cb
 

Called when starting working on an item.

gint bgtask::step
 

Current processing step.

gint bgtask::stepcnt
 

Amount of steps in the `stepvec' array.

bgstep_cb_t* bgtask::stepvec
 

Set of steps to run in sequence.

gdouble bgtask::tick_cost
 

Time in ms.

spent by each tick

gint bgtask::ticks
 

Scheduling ticks for time slice.

gint bgtask::ticks_used
 

Amount of ticks used by processing step.

gpointer bgtask::ucontext
 

User context.

bgclean_cb_t bgtask::uctx_free
 

Free routine for context.

GSList* bgtask::wq
 

Work queue (daemon task only).

gint bgtask::wtime
 

Wall-clock run time sofar, in ms.


The documentation for this struct was generated from the following file:
Generated on Sun Feb 12 10:50:11 2006 for Gtk-Gnutella by doxygen 1.3.6