summary refs log tree commit diff
path: root/devices/src/pci/ac97_bus_master.rs
diff options
context:
space:
mode:
authorChirantan Ekbote <chirantan@chromium.org>2019-07-29 18:29:04 +0900
committerCommit Bot <commit-bot@chromium.org>2019-10-07 19:00:34 +0000
commitbf67203f972215ce0119a1588ac900068c86fb33 (patch)
treec96473e08d8868166d613bd21224a0466f0a6217 /devices/src/pci/ac97_bus_master.rs
parent41e61d1fc373a38d37961793bb342c207d7adeea (diff)
downloadcrosvm-bf67203f972215ce0119a1588ac900068c86fb33.tar
crosvm-bf67203f972215ce0119a1588ac900068c86fb33.tar.gz
crosvm-bf67203f972215ce0119a1588ac900068c86fb33.tar.bz2
crosvm-bf67203f972215ce0119a1588ac900068c86fb33.tar.lz
crosvm-bf67203f972215ce0119a1588ac900068c86fb33.tar.xz
crosvm-bf67203f972215ce0119a1588ac900068c86fb33.tar.zst
crosvm-bf67203f972215ce0119a1588ac900068c86fb33.zip
sys_util: Add ReadWriteAtVolatile trait and `*vectored` functions
Add the FileReadWriteAtVolatile trait, which is basically the same as
the FileReadWriteVolatile trait but additionally takes an offest.  This
is only useful for types that are seekable and can allow concurrent
operations on the same underlying type.

Also add `*_vectored` versions of all the functions.  These match the
`*_vectored` functions in the standard library and can reduce the number
of system calls needed to read or write a whole buffer.

Implement both traits for `&mut T` if `T` implements them.

Change the trait implementation for `File` to a macro so that we can
also implement it for `GuestMemory`.

BUG=b:136128319
TEST=unit tests

Change-Id: I3d8eb7bba17fe3247e18649b1b04e21a91a841e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1724229
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'devices/src/pci/ac97_bus_master.rs')
0 files changed, 0 insertions, 0 deletions