mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01:00
ircd::fs::aio: Test for blocking flag rather than option if available.
This commit is contained in:
parent
c04708aca4
commit
d6374466f3
1 changed files with 10 additions and 1 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Reference in a new issue