artiq/artiq/firmware/runtime
whitequark 88bf7d2233 firmware: specialize protocol read/write functions.
Before this commit, proto::io::{read,write}_* functions were taking
a &mut {Read,Write}. This means a lot of virtual dispatch.
After this commit, all these functions are specialized for
the specific IO trait.

This could be achieved with just changing the signature from
  fn read_x(reader: &mut Read)
to
  fn read_x<R: Read>(reader: &mut R)
but the functions were also grouped into ReadExt and WriteExt
traits as a refactoring.

Initially, it was expected that the generic traits from
the byteorder crate could be used, but they require endianness
to be specified on every call and thus aren't very ergonomic.
They also lack the equivalent to our read_string and read_bytes.

Thus, it seems fine to just define a slightly different extension
trait.

This also optimized the test_rpc_timing test: 1.7ms→1.2ms.
2017-02-26 18:24:37 +00:00
..
analyzer.rs firmware: use ? instead of try! everywhere. 2017-01-31 22:18:59 +00:00
build.rs firmware: misoc_registers -> misoc_cfg 2017-01-27 23:28:00 +08:00
cache.rs runtime: reorganize to support DRTIO satellite firmware 2016-12-16 19:11:19 +08:00
Cargo.toml firmware: restructure to avoid #[path = "..."] mod ...; 2017-02-25 17:54:14 +00:00
config.rs firmware: port flash storage management to Rust. 2017-02-02 05:26:06 +00:00
ethmac.rs Use four ethmac buffers instead of two. 2017-01-30 07:42:27 +00:00
kernel.rs firmware: migrate last vestiges of the old runtime build system. 2017-02-03 12:59:35 +00:00
lib.rs Merge branch 'master' of github.com:m-labs/artiq 2017-02-27 01:05:40 +08:00
Makefile firmware: migrate last vestiges of the old runtime build system. 2017-02-03 12:59:35 +00:00
moninj.rs runtime: new moninj protocol, TCP-based, with DRTIO support 2017-02-25 12:07:00 +08:00
rtio_dma.rs firmware: specialize protocol read/write functions. 2017-02-26 18:24:37 +00:00
rtio_mgt.rs runtime: new moninj protocol, TCP-based, with DRTIO support 2017-02-25 12:07:00 +08:00
runtime.ld firmware: migrate last vestiges of the old runtime build system. 2017-02-03 12:59:35 +00:00
sched.rs firmware: use ? instead of try! everywhere. 2017-01-31 22:18:59 +00:00
session.rs Implement recording of DMA traces on the core device. 2017-02-26 02:50:20 +00:00
urc.rs runtime: reorganize to support DRTIO satellite firmware 2016-12-16 19:11:19 +08:00