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
@@ -20,7 +20,7 @@ impl ControlledWallClock {
/// Advance civil time explicitly, saturating at the largest timestamp.
pub fn advance(&self, seconds: u64) {
// Harness control may retry on a concurrent update; reads remain a single load.
let _ = self.seconds.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
let _ = self.seconds.try_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
Some(current.saturating_add(seconds))
});
}
@@ -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)]
@@ -18,7 +18,7 @@ impl PublicationControl {
}
fn enter(&self) -> Result<()> {
self.0
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |state| {
.try_update(Ordering::SeqCst, Ordering::SeqCst, |state| {
if state & 2 == 0 { Some(state | 1) } else { None }
})
.map(|_| ())