use granular hierarchical locks in offset_table.rs

This commit is contained in:
Mark Thom
2025-06-24 21:58:40 -07:00
committed by Mark Thom
parent 2844b5a958
commit 762b63e1f4
18 changed files with 233 additions and 333 deletions

View File

@@ -186,12 +186,12 @@ impl CodeIndex {
#[inline(always)]
pub(crate) fn set(&self, code_index_tbl: &mut CodeIndexTable, value: IndexPtr) {
code_index_tbl.lookup_mut(self.0).set(value);
code_index_tbl.with_entry_mut(self.0, |idx| *idx = value);
}
#[inline(always)]
pub(crate) fn replace(&self, code_index_tbl: &mut CodeIndexTable, value: IndexPtr) -> IndexPtr {
code_index_tbl.lookup_mut(self.0).replace(value)
code_index_tbl.with_entry_mut(self.0, |idx| std::mem::replace(idx, value))
}
}