0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 15:00:51 +01:00

ircd::aio: Zero-length IO is very much a thing.

This commit is contained in:
Jason Volk 2018-02-17 17:13:47 -08:00
parent 62f4db4cce
commit 2be465d67f
2 changed files with 2 additions and 3 deletions

View file

@ -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);
}

View file

@ -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};