mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 16:34:13 +01:00
ircd::aio: Zero-length IO is very much a thing.
This commit is contained in:
parent
62f4db4cce
commit
2be465d67f
2 changed files with 2 additions and 3 deletions
|
@ -193,7 +193,7 @@ try
|
|||
{
|
||||
ctx::wait();
|
||||
}
|
||||
while(!retval && !errcode);
|
||||
while(retval == -2);
|
||||
|
||||
if(retval == -1)
|
||||
throw_system_error(errcode);
|
||||
|
@ -212,7 +212,6 @@ catch(const ctx::interrupted &e)
|
|||
void
|
||||
ircd::fs::aio::request::handle()
|
||||
{
|
||||
assert(this->retval || errcode);
|
||||
if(likely(waiter && waiter != ctx::current))
|
||||
ircd::ctx::notify(*waiter);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ struct ircd::fs::aio::request
|
|||
struct read;
|
||||
struct write;
|
||||
|
||||
ssize_t retval {0};
|
||||
ssize_t retval {-2};
|
||||
ssize_t errcode {0};
|
||||
ctx::ctx *waiter {ctx::current};
|
||||
|
||||
|
|
Loading…
Reference in a new issue