2 * Copyright (C) 2005-2006 Martin Willi
3 * Copyright (C) 2005 Jan Hutter
4 * Hochschule fuer Technik Rapperswil
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 typedef struct job_t job_t
;
26 typedef enum job_priority_t job_priority_t
;
31 * Priority classes of jobs
34 /** Short jobs executed with highest priority */
36 /** Default job priority */
38 /** Low priority jobs with thread blocking operations */
44 * Enum names for job priorities
46 extern enum_name_t
*job_priority_names
;
49 * Job interface as it is stored in the job queue.
56 * The processing facility executes a job using this method. Jobs are
57 * one-shot, they destroy themself after execution, so don't use a job
58 * once it has been executed.
60 void (*execute
) (job_t
*this);
63 * Get the priority of a job.
65 * @return job priority
67 job_priority_t (*get_priority
)(job_t
*this);
72 * Is only called whenever a job was not executed (e.g. due daemon shutdown).
73 * After execution, jobs destroy themself.
75 void (*destroy
) (job_t
*this);
78 #endif /** JOB_H_ @}*/