crosvm/cros_async
Frederick Mayle cb450f4996 cros_async: factor out common executor code
fd_executor, uring_executor, and handle_executor had a lot of duplicate
code. A new trait `Reactor` is introduced to abstract away the
differences between the IO backends. There is now a single
`RawExecutor`, which is generic over `Reactor`s.

No behavior changes are intended, with some small exceptions:

* A new error variant is used in some cases, e.g. instead of
  `Error::PollExecutor` an error might be `Error::Io` now. Nothing seems
  to inspect these errors, so it is unlikely to cause an issue.
* There is an extra alloc when the executor is dropped (for the boxed
  future).
* The Unix backends had an `AtomicI32` state field but the Windows
  backend did not. Now Windows does as well. This might save a syscall
  here and there.

Change-Id: Ieeff9d9888ed082cf3e0213e586c55c9d8a1f8bf
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4331554
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-05-18 17:40:14 +00:00
..
src cros_async: factor out common executor code 2023-05-18 17:40:14 +00:00
Cargo.toml Fix remaining Chrome/Chromium OS instances 2023-01-03 22:14:30 +00:00