summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2007-05-26 17:04:36 +0200
committerMichael Brown2007-05-26 17:04:36 +0200
commit10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6 (patch)
tree626d6b2493ebf72ef02ae7bae5f7bc77de8d7092 /src/include
parentModify process semantics; rescheduling is now automatic. (diff)
downloadipxe-10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6.tar.gz
ipxe-10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6.tar.xz
ipxe-10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6.zip
Modify data-xfer semantics: it is no longer necessary to call one of
request(), seek() or deliver_xxx() in order to start the data flow. Autonomous generators must be genuinely autonomous (having their own process), or otherwise arrange to be called. TCP does this by starting the retry timer immediately. Add some debugging statements.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/xfer.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/include/gpxe/xfer.h b/src/include/gpxe/xfer.h
index 71b69dc5..e6c896c3 100644
--- a/src/include/gpxe/xfer.h
+++ b/src/include/gpxe/xfer.h
@@ -112,6 +112,20 @@ enum seek_whence {
SEEK_CUR,
};
+/**
+ * Describe seek basis
+ *
+ * @v whence Basis for new position
+ */
+static inline __attribute__ (( always_inline )) const char *
+whence_text ( int whence ) {
+ switch ( whence ) {
+ case SEEK_SET: return "SET";
+ case SEEK_CUR: return "CUR";
+ default: return "INVALID";
+ }
+}
+
extern struct xfer_interface null_xfer;
extern struct xfer_interface_operations null_xfer_ops;
@@ -121,8 +135,8 @@ extern int xfer_vredirect ( struct xfer_interface *xfer, int type,
extern int xfer_redirect ( struct xfer_interface *xfer, int type, ... );
extern int xfer_request ( struct xfer_interface *xfer, off_t offset,
int whence, size_t len );
-extern int xfer_request_all ( struct xfer_interface *xfer );
extern int xfer_seek ( struct xfer_interface *xfer, off_t offset, int whence );
+extern int xfer_ready ( struct xfer_interface *xfer );
extern struct io_buffer * xfer_alloc_iob ( struct xfer_interface *xfer,
size_t len );
extern int xfer_deliver_iob ( struct xfer_interface *xfer,