mirror of
https://github.com/telemt/telemt.git
synced 2026-11-02 05:42:00 +03:00
Descriptor-anchored Secured Filesystem Operations
This commit is contained in:
@@ -54,10 +54,7 @@ impl SlotBudget {
|
||||
.fetch_update(Ordering::AcqRel, Ordering::Acquire, |current| {
|
||||
current.checked_sub(amount)
|
||||
});
|
||||
#[cfg(not(test))]
|
||||
debug_assert!(released.is_ok(), "slot budget release must match acquisitions");
|
||||
#[cfg(test)]
|
||||
let _ = released;
|
||||
}
|
||||
|
||||
/// Returns the exact number of currently committed or reserved slots.
|
||||
@@ -65,10 +62,6 @@ impl SlotBudget {
|
||||
self.used.load(Ordering::Acquire)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn reset_for_testing(&self) {
|
||||
self.used.store(0, Ordering::Release);
|
||||
}
|
||||
}
|
||||
|
||||
/// Provisional slot ownership that rolls back unless committed to a registry entry.
|
||||
|
||||
Reference in New Issue
Block a user