diff options
author | Michael Brown | 2007-01-15 09:49:10 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-15 09:49:10 +0100 |
commit | 4e20d73bb52326261f8cf49c20d6de2edea309ee (patch) | |
tree | 3d24466a78c4c8f53294384b76e62e871eb96def /src/net/aoe.c | |
parent | Add missing include (diff) | |
download | ipxe-4e20d73bb52326261f8cf49c20d6de2edea309ee.tar.gz ipxe-4e20d73bb52326261f8cf49c20d6de2edea309ee.tar.xz ipxe-4e20d73bb52326261f8cf49c20d6de2edea309ee.zip |
Gave asynchronous operations approximate POSIX signal semantics. This
will enable us to cascade async operations, which is necessary in order to
properly support DNS. (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).
Anything other than HTTP is probably broken right now; I'll fix the others
up asap.
Diffstat (limited to 'src/net/aoe.c')
-rw-r--r-- | src/net/aoe.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/net/aoe.c b/src/net/aoe.c index 2dc5ed40..1c3cd1d2 100644 --- a/src/net/aoe.c +++ b/src/net/aoe.c @@ -56,7 +56,7 @@ static void aoe_done ( struct aoe_session *aoe, int rc ) { aoe->command = NULL; /* Mark async operation as complete */ - async_done ( &aoe->aop, rc ); + async_done ( &aoe->async, rc ); } /** @@ -309,17 +309,19 @@ void aoe_close ( struct aoe_session *aoe ) { * * @v aoe AoE session * @v command ATA command - * @ret aop Asynchronous operation + * @v parent Parent asynchronous operation + * @ret rc Return status code * * Only one command may be issued concurrently per session. This call * is non-blocking; use async_wait() to wait for the command to * complete. */ -struct async_operation * aoe_issue ( struct aoe_session *aoe, - struct ata_command *command ) { +int aoe_issue ( struct aoe_session *aoe, struct ata_command *command, + struct async *parent ) { aoe->command = command; aoe->status = 0; aoe->command_offset = 0; aoe_send_command ( aoe ); - return &aoe->aop; + async_init ( &aoe->async, &default_async_operations, parent ); + return 0; } |