mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
The lifetime parameter on the DescriptorChain struct ensures that it doesn't outlive the GuestMemory that it references. However, this has the unfortunate effect that DescriptorChains cannot be sent across thread boundaries (because they don't have a static lifetime). Instead, have the DescriptorChain clone the GuestMemory instead. This ensures that the DescriptorChain will not outlive the GuestMemory while also allowing it to be sent across thread boundaries. dgreid - re-base and modify `next_async` to remove lifetime as well. BUG=b:150264042 TEST=unit tests Change-Id: I745d80d640c9766cbf36db0419c48fe077e0080d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2103601 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Dylan Reid <dgreid@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |