2 ms·
I think this is a great example where modern languages are better. - It shows that declaring statics is unsafe. - It shows that taking a reference to a static
by WirelessGigabit 4y ago
I think this is a great example where modern languages are better.
- It shows that declaring statics is unsafe.
- It shows that taking a reference to a static is inherently unsafe.
- It shows that it actually helps if we distinguish passing something as mutable or non-mutable, and keep said mutability exclusive.
I find this code VERY opaque to read in terms of what it is that we are actually passing.
I'm also confused why the creation of the structs wasn't and still isn't wrapped in an `ifdef`. Now if I only have a VIO device there is still a lingering `fail_iommu_pci_bus_notifier` in the code at top level. I'm not familiar enough with how this is compiled, but it looks like it's part of the public interface, and as such would not be able to be compiled away?