summary refs log tree commit diff stats
path: root/rust/qemu-api/src/irq.rs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-15 12:20:35 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-12-10 18:49:26 +0100
commitc596199f639cdf4cc021c9bc076e4a1e64e9d50f (patch)
treeb03baf9bffed81111d5280bbca9eb6ef4dc7c498 /rust/qemu-api/src/irq.rs
parent8e194c0ea5cdbae05b77125a582f9927678121ee (diff)
downloadfocaccia-qemu-c596199f639cdf4cc021c9bc076e4a1e64e9d50f.tar.gz
focaccia-qemu-c596199f639cdf4cc021c9bc076e4a1e64e9d50f.zip
rust: cell: add BQL-enforcing RefCell variant
Similar to the existing BqlCell, introduce a custom interior mutability
primitive that resembles RefCell but accounts for QEMU's threading model.
Borrowing the RefCell requires proving that the BQL is held, and
attempting to access without the BQL is a runtime panic.

Almost all of the code was taken from Rust's standard library, while
removing unstable features and probably-unnecessary functionality that
amounts to 60% of the original code.  A lot of what's left is documentation,
as well as unit tests in the form of doctests.  These are not yet integrated
in "make check" but can be run with "cargo test --doc".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/irq.rs')
0 files changed, 0 insertions, 0 deletions