Skip to content

Commit bace17d

Browse files
committed
Improve privacy and comments in ThreadClockSet
1 parent 22a1674 commit bace17d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/data_race.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub enum AtomicFenceOp {
106106
pub struct ThreadClockSet {
107107
/// The increasing clock representing timestamps
108108
/// that happen-before this thread.
109-
pub clock: VClock,
109+
pub(crate) clock: VClock,
110110

111111
/// The set of timestamps that will happen-before this
112112
/// thread once it performs an acquire fence.
@@ -116,11 +116,17 @@ pub struct ThreadClockSet {
116116
/// have been released by this thread by a fence.
117117
fence_release: VClock,
118118

119-
pub fence_seqcst: VClock,
119+
/// Timestamps of the last SC fence performed by each
120+
/// thread, updated when this thread performs an SC fence
121+
pub(crate) fence_seqcst: VClock,
120122

121-
pub write_seqcst: VClock,
123+
/// Timestamps of the last SC write performed by each
124+
/// thread, updated when this thread performs an SC fence
125+
pub(crate) write_seqcst: VClock,
122126

123-
pub read_seqcst: VClock,
127+
/// Timestamps of the last SC fence performed by each
128+
/// thread, updated when this thread performs an SC read
129+
pub(crate) read_seqcst: VClock,
124130
}
125131

126132
impl ThreadClockSet {

0 commit comments

Comments
 (0)