Modeling embedded hardware in Rust and how to have multiple mutable references cleanly?
问题 I'm modeling a system that has a CPU, GPU, MMU, APU, and maybe other things. The CPU will have mutable references to the GPU, MMU, and APU. I also would like the MMU to have a way to be able to call specific functions on the GPU and APU. Where this comes into play is when I'm mapping memory to different locations. The MMU takes care of that, and will dispatch to GPU or APU if the memory request is in those devices. Here is how I modeled it using Arc and Mutex . I was wondering if there is a