-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(virtq): represent avail and used buffers as distinct types
Sized element downcasting and vector popping from the device-writable buffer only make sense for buffers that have been used by the device. By separating the available buffer and the used buffer types, we can ensure that they are called at the correct point of the buffer's lifecycle and make the assume_init calls for the driver. Furthermore, a distinct used buffer type allows us to delay the initialized length checks until the point of use by the driver, where the potential errors can be better handled.
- Loading branch information
Showing
5 changed files
with
135 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.