0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 10:08:56 +02:00

ircd::fs::aio: Test for blocking flag rather than option if available.

This commit is contained in:
Jason Volk 2019-04-22 09:45:14 -07:00
parent c04708aca4
commit d6374466f3

View file

@ -417,8 +417,17 @@ ircd::fs::aio::request::operator()()
return size_t(retval);
assert(opts);
const bool blocking
{
#if defined(RWF_NOWAIT)
~aio_rw_flags & RWF_NOWAIT
#else
opts->blocking
#endif
};
static_assert(EAGAIN == EWOULDBLOCK);
if(!opts->blocking && retval == -1 && errcode == EAGAIN)
if(!blocking && retval == -1 && errcode == EAGAIN)
return 0UL;
stats.errors++;