mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd::fs::aio: Add assertions at cancel() entry; tweak assertions that compare pointers.
This commit is contained in:
parent
0c24ea5f40
commit
7aa9102f45
1 changed files with 6 additions and 2 deletions
|
@ -488,7 +488,10 @@ catch(const ctx::terminated &)
|
|||
void
|
||||
ircd::fs::aio::system::cancel(request &request)
|
||||
{
|
||||
const auto &cb
|
||||
assert(request.retval == std::numeric_limits<ssize_t>::min());
|
||||
assert(request.aio_data == uintptr_t(&request));
|
||||
|
||||
iocb *const cb
|
||||
{
|
||||
static_cast<iocb *>(&request)
|
||||
};
|
||||
|
@ -793,7 +796,8 @@ noexcept try
|
|||
|
||||
// Check that everything lines up.
|
||||
assert(iocb == static_cast<struct ::iocb *>(&request));
|
||||
assert(reinterpret_cast<aio::request *>(iocb->aio_data) == &request);
|
||||
assert(request.aio_data == iocb->aio_data);
|
||||
assert(request.aio_data == uintptr_t(&request));
|
||||
|
||||
// Assert that we understand the return-value semantics of this interface.
|
||||
assert(event.res2 >= 0);
|
||||
|
|
Loading…
Reference in a new issue