@@ -28,8 +28,8 @@ namespace Robustness {
2828 };
2929 // ! Location component
3030 struct Location {
31- timestamp_t stamp = 0 ;
32- timestamp_t stampu = 0 ;
31+ timestamp_t stamp = kEpochZero ;
32+ timestamp_t stampu = kEpochZero ;
3333 VectorClock m, w;
3434 VectorClock mu, wu;
3535 };
@@ -53,12 +53,12 @@ namespace Robustness {
5353 * Memory order is ignored for SC
5454 */
5555 void updateStoreStatement (ThreadId , LocationId a, Thread &ts, Location &ls, morder, u64 val){
56- ls.m |= timestamp (a, ++ ls.stamp );
56+ ls.m |= timestamp (a, EpochInc ( ls.stamp ) );
5757 ts.v |= ls.m ;
5858 ls.w = ts.v ;
5959 ls.m = ts.v ;
6060
61- ls.mu |= timestamp (a, ++ ls.stampu );
61+ ls.mu |= timestamp (a, EpochInc ( ls.stampu ) );
6262 ts.vu |= ls.mu ;
6363 ls.wu = ts.vu ;
6464 ls.mu = ts.vu ;
@@ -71,7 +71,7 @@ namespace Robustness {
7171 */
7272 void updateRmwStatement (ThreadId t, LocationId a, Thread &ts, Location &ls, morder mo, u64 val){
7373 // return updateStoreStatement(t, a, ts, ls, mo);
74- ls.m |= timestamp (a, ++ ls.stamp );
74+ ls.m |= timestamp (a, EpochInc ( ls.stamp ) );
7575 ts.v |= ls.m ;
7676 ls.w = ts.v ;
7777 ls.m = ts.v ;
@@ -91,12 +91,6 @@ namespace Robustness {
9191 timestamp_t getLastTimeStampU (ThreadId , LocationId l, Thread &ts, Location &ls) const {
9292 return ts.vu [l].ts ;
9393 }
94- timestamp_t getLastTimeStampV (ThreadId , LocationId l, Thread &ts, Location &ls, u64 val) const {
95- return ts.v [l].ts - 1 ;
96- }
97- timestamp_t getLastTimeStampUV (ThreadId , LocationId l, Thread &ts, Location &ls, u64 val) const {
98- return ts.vu [l].ts - 1 ;
99- }
10094
10195 // ! Remove locations when freeing memory
10296 void freeLocation (LocationId l, Location &ls){
@@ -138,7 +132,7 @@ namespace Robustness {
138132 };
139133 // ! Location component
140134 struct Location {
141- timestamp_t writeStamp = 0 , writeStampU = 0 ;
135+ timestamp_t writeStamp = kEpochZero , writeStampU = kEpochZero ;
142136 VectorClock w;
143137 VectorClock wu;
144138 };
@@ -162,8 +156,8 @@ namespace Robustness {
162156
163157 // ! Update store statement
164158 void updateStoreStatement (ThreadId t, LocationId a, Thread &ts, Location &ls, morder mo, uint64_t oldValue){
165- const auto timestampV = timestamp (a, ++ ls.writeStamp );
166- const auto timestampVU = timestamp (a, ++ ls.writeStampU );
159+ const auto timestampV = timestamp (a, EpochInc ( ls.writeStamp ) );
160+ const auto timestampVU = timestamp (a, EpochInc ( ls.writeStampU ) );
167161 ls.w |= timestampV;
168162 ls.wu |= timestampVU;
169163 ts.va |= timestampV;
@@ -185,7 +179,7 @@ namespace Robustness {
185179
186180 // ! Update RMW statement
187181 void updateRmwStatement (ThreadId t, LocationId a, Thread &ts, Location &ls, morder mo, uint64_t oldValue){
188- const auto timestampV = timestamp (a, ++ ls.writeStamp );
182+ const auto timestampV = timestamp (a, EpochInc ( ls.writeStamp ) );
189183 ls.w |= timestampV;
190184 ts.va |= timestampV;
191185 ts.vc |= timestampV;
0 commit comments