fix(runtime): replace deprecated atomic fetch_update calls
Intrepid/Prometeu/Runtime/pipeline/head There was a failure building this commit

This commit is contained in:
2026-11-03 00:01:58 +00:00
parent a4bec5bc45
commit 1aa939eca8
3 changed files with 5 additions and 7 deletions
@@ -9,11 +9,9 @@ pub const GUEST_BYTES: usize = 4096;
static NEXT_CONTEXT: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(1);
fn next_context() -> Result<u64> {
NEXT_CONTEXT
.fetch_update(
std::sync::atomic::Ordering::SeqCst,
std::sync::atomic::Ordering::SeqCst,
|n| n.checked_add(1).filter(|&next| next <= i64::MAX as u64),
)
.try_update(std::sync::atomic::Ordering::SeqCst, std::sync::atomic::Ordering::SeqCst, |n| {
n.checked_add(1).filter(|&next| next <= i64::MAX as u64)
})
.map_err(|_| Error::CounterExhausted)
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]