Asserts that wait_io_completion must return
The rust wrappers `write_blocks_ex/read_blocks_ex/flush_ex` in
BlockIo2Protocol are technically unsafe because an async block can be
aborted or dropped at any `.await` statment. It's possible that
`wait_io_completion()` has not completed before the entire async Future
gets dropped, and thus violating the aliasing rule.
Thc CL adds a `assert_return` helper API that runs a Future and
asserts at run time that it returns before the Future get dropped. The
BlockIo2 EFI call and `wait_io_completion()` are now wrapped in
`must_return`.
Change-Id: Iee93b48ce515d055c14f87459da848d1ed97678f
2 files changed