Improve privacy and comments

This commit is contained in:
Andy Wang 2022-05-11 23:52:38 +01:00
parent 62b514e235
commit 773131bb26
No known key found for this signature in database
GPG key ID: 181B49F9F38F3374
2 changed files with 11 additions and 5 deletions

View file

@ -103,7 +103,7 @@ pub enum AtomicFenceOp {
pub struct ThreadClockSet {
/// The increasing clock representing timestamps
/// that happen-before this thread.
pub clock: VClock,
pub(crate) clock: VClock,
/// The set of timestamps that will happen-before this
/// thread once it performs an acquire fence.
@ -113,11 +113,17 @@ pub struct ThreadClockSet {
/// have been released by this thread by a fence.
fence_release: VClock,
pub fence_seqcst: VClock,
/// Timestamps of the last SC fence performed by each
/// thread, updated when this thread performs an SC fence
pub(crate) fence_seqcst: VClock,
pub write_seqcst: VClock,
/// Timestamps of the last SC write performed by each
/// thread, updated when this thread performs an SC fence
pub(crate) write_seqcst: VClock,
pub read_seqcst: VClock,
/// Timestamps of the last SC fence performed by each
/// thread, updated when this thread performs an SC read
pub(crate) read_seqcst: VClock,
}
impl ThreadClockSet {

View file

@ -88,7 +88,7 @@ pub struct StoreBuffer {
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct StoreElement {
struct StoreElement {
/// The identifier of the vector index, corresponding to a thread
/// that performed the store.
store_index: VectorIdx,