diff options
| author | bors <bors@rust-lang.org> | 2024-08-16 16:14:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-16 16:14:42 +0000 |
| commit | 83f1b380825d50e3cffe84ef4c39a09bf841a3c1 (patch) | |
| tree | c70b68a567305becd89e4a26a0c37d07b7a2a370 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 1a51dd9247c5ecf9efa99ebf644bb12e33dcf3b5 (diff) | |
| parent | 883e4773b30f652e83326df99dc0ec7d652e1f94 (diff) | |
| download | rust-83f1b380825d50e3cffe84ef4c39a09bf841a3c1.tar.gz rust-83f1b380825d50e3cffe84ef4c39a09bf841a3c1.zip | |
Auto merge of #3809 - RalfJung:fd-refcell, r=oli-obk
FD: remove big surrounding RefCell, simplify socketpair A while ago, I added the big implicit RefCell for all file descriptions since it avoided interior mutability in `eventfd`. However, this requires us to hold the RefCell "lock" around the entire invocation of the `read`/`write` methods on an FD, which is not great. For instance, if an FD wants to update epoll notifications from inside its `read`/`write`, it is very crucial that the notification check does not end up accessing the FD itself. Such cycles, however, occur naturally: - eventfd wants to update notifications for itself - socketfd wants to update notifications on its "peer", which will in turn check *its* peer to see whether that buffer is empty -- and my peer's peer is myself. This then also lets us simplify socketpair, which currently holds a weak reference to its peer *and* a weak reference to the peer's buffer -- that was previously needed precisely to avoid this issue.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
