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

ircd::fs::aio: Add additional assertions.

This commit is contained in:
Jason Volk 2018-11-27 19:53:32 -08:00
parent 0451dfd925
commit 12cf8c8772

View file

@ -173,6 +173,9 @@ ircd::fs::aio::write(const fd &fd,
data(buf), bytes
};
// Does linux ever not complete all bytes for an AIO?
assert(size(view) == size(buf));
return view;
}
@ -378,6 +381,8 @@ noexcept try
// The count should be at least 1 event. The only reason to return 0 might
// be related to an INTR; this assert will find out and may be commented.
//assert(count > 0);
assert(count >= 0);
for(ssize_t i(0); i < count; ++i)
handle_event(event[i]);