summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/job.h
diff options
context:
space:
mode:
authorMichael Brown2007-05-01 02:07:57 +0200
committerMichael Brown2007-05-01 02:07:57 +0200
commite3dcb9a1ade50f24c3ac5e9e11dce0b4de229d1f (patch)
tree67bb8c9db128d0d81d3f8b9bd7d55dc8b4f931b5 /src/include/gpxe/job.h
parentClarify behaviour of plug() by using intf_put() and intf_get(). (diff)
downloadipxe-e3dcb9a1ade50f24c3ac5e9e11dce0b4de229d1f.tar.gz
ipxe-e3dcb9a1ade50f24c3ac5e9e11dce0b4de229d1f.tar.xz
ipxe-e3dcb9a1ade50f24c3ac5e9e11dce0b4de229d1f.zip
Add start() event
Add "xfer" to all xfer functions and "job" to all job functions.
Diffstat (limited to 'src/include/gpxe/job.h')
-rw-r--r--src/include/gpxe/job.h47
1 files changed, 42 insertions, 5 deletions
diff --git a/src/include/gpxe/job.h b/src/include/gpxe/job.h
index ded6c8460..23077e7a6 100644
--- a/src/include/gpxe/job.h
+++ b/src/include/gpxe/job.h
@@ -33,6 +33,11 @@ struct job_interface;
/** Job control interface operations */
struct job_interface_operations {
+ /** Start job
+ *
+ * @v job Job control interface
+ */
+ void ( * start ) ( struct job_interface *job );
/** Job completed
*
* @v job Job control interface
@@ -64,12 +69,13 @@ struct job_interface {
extern struct job_interface null_job;
extern struct job_interface_operations null_job_ops;
-extern void done ( struct job_interface *job, int rc );
+extern void job_done ( struct job_interface *job, int rc );
-extern void ignore_done ( struct job_interface *job, int rc );
-extern void ignore_kill ( struct job_interface *job );
-extern void ignore_progress ( struct job_interface *job,
- struct job_progress *progress );
+extern void ignore_job_start ( struct job_interface *job );
+extern void ignore_job_done ( struct job_interface *job, int rc );
+extern void ignore_job_kill ( struct job_interface *job );
+extern void ignore_job_progress ( struct job_interface *job,
+ struct job_progress *progress );
/**
* Initialise a job control interface
@@ -109,6 +115,37 @@ job_dest ( struct job_interface *job ) {
}
/**
+ * Plug a job control interface into a new destination interface
+ *
+ * @v job Job control interface
+ * @v dest New destination interface
+ */
+static inline void job_plug ( struct job_interface *job,
+ struct job_interface *dest ) {
+ plug ( &job->intf, &dest->intf );
+}
+
+/**
+ * Plug two job control interfaces together
+ *
+ * @v a Job control interface A
+ * @v b Job control interface B
+ */
+static inline void job_plug_plug ( struct job_interface *a,
+ struct job_interface *b ) {
+ plug_plug ( &a->intf, &b->intf );
+}
+
+/**
+ * Unplug a job control interface
+ *
+ * @v job Job control interface
+ */
+static inline void job_unplug ( struct job_interface *job ) {
+ plug ( &job->intf, &null_job.intf );
+}
+
+/**
* Stop using a job control interface
*
* @v job Job control interface