diff --git a/ipc-queue/src/fifo.rs b/ipc-queue/src/fifo.rs index d9ca36ba..d834673a 100644 --- a/ipc-queue/src/fifo.rs +++ b/ipc-queue/src/fifo.rs @@ -68,7 +68,7 @@ where let arc = Arc::new(FifoBuffer::new(len)); let inner = Fifo::from_arc(arc); let tx = AsyncSender { inner: inner.clone(), synchronizer: s.clone() }; - let rx = AsyncReceiver { inner, synchronizer: s, read_epoch: Arc::new(AtomicU32::new(0)) }; + let rx = AsyncReceiver { inner, synchronizer: s, read_epoch: Arc::new(AtomicU64::new(0)) }; (tx, rx) } diff --git a/ipc-queue/src/lib.rs b/ipc-queue/src/lib.rs index 4cc31117..42fd7915 100644 --- a/ipc-queue/src/lib.rs +++ b/ipc-queue/src/lib.rs @@ -10,7 +10,7 @@ use std::future::Future; use std::pin::Pin; -use std::sync::atomic::AtomicU32; +use std::sync::atomic::AtomicU64; use std::sync::Arc; use fortanix_sgx_abi::FifoDescriptor; @@ -154,7 +154,7 @@ pub struct AsyncSender { pub struct AsyncReceiver { inner: Fifo, synchronizer: S, - read_epoch: Arc, + read_epoch: Arc, } /// `DescriptorGuard` can produce a `FifoDescriptor` that is guaranteed @@ -177,7 +177,7 @@ impl DescriptorGuard { /// read to/from the queue. This is useful in case we want to know whether or /// not a particular value written to the queue has been read. pub struct PositionMonitor { - read_epoch: Arc, + read_epoch: Arc, fifo: Fifo, }