forked from OSchip/llvm-project
[tsan] Complete renaming kMaxSid to kThreadSlotCount
This was missing from 5c2b48fdb0
This commit is contained in:
parent
713a5d12cd
commit
1f04d8ed2e
|
@ -24,7 +24,8 @@ VectorClock::VectorClock() { Reset(); }
|
|||
|
||||
void VectorClock::Reset() {
|
||||
#if !TSAN_VECTORIZE
|
||||
for (uptr i = 0; i < kMaxSid; i++) clk_[i] = kEpochZero;
|
||||
for (uptr i = 0; i < kThreadSlotCount; i++)
|
||||
clk_[i] = kEpochZero;
|
||||
#else
|
||||
m128 z = _mm_setzero_si128();
|
||||
m128* vclk = reinterpret_cast<m128*>(clk_);
|
||||
|
@ -36,7 +37,8 @@ void VectorClock::Acquire(const VectorClock* src) {
|
|||
if (!src)
|
||||
return;
|
||||
#if !TSAN_VECTORIZE
|
||||
for (uptr i = 0; i < kMaxSid; i++) clk_[i] = max(clk_[i], src->clk_[i]);
|
||||
for (uptr i = 0; i < kThreadSlotCount; i++)
|
||||
clk_[i] = max(clk_[i], src->clk_[i]);
|
||||
#else
|
||||
m128* __restrict vdst = reinterpret_cast<m128*>(clk_);
|
||||
m128 const* __restrict vsrc = reinterpret_cast<m128 const*>(src->clk_);
|
||||
|
@ -67,7 +69,8 @@ void VectorClock::ReleaseStore(VectorClock** dstp) const {
|
|||
|
||||
VectorClock& VectorClock::operator=(const VectorClock& other) {
|
||||
#if !TSAN_VECTORIZE
|
||||
for (uptr i = 0; i < kMaxSid; i++) clk_[i] = other.clk_[i];
|
||||
for (uptr i = 0; i < kThreadSlotCount; i++)
|
||||
clk_[i] = other.clk_[i];
|
||||
#else
|
||||
m128* __restrict vdst = reinterpret_cast<m128*>(clk_);
|
||||
m128 const* __restrict vsrc = reinterpret_cast<m128 const*>(other.clk_);
|
||||
|
@ -82,7 +85,7 @@ VectorClock& VectorClock::operator=(const VectorClock& other) {
|
|||
void VectorClock::ReleaseStoreAcquire(VectorClock** dstp) {
|
||||
VectorClock* dst = AllocClock(dstp);
|
||||
#if !TSAN_VECTORIZE
|
||||
for (uptr i = 0; i < kMaxSid; i++) {
|
||||
for (uptr i = 0; i < kThreadSlotCount; i++) {
|
||||
Epoch tmp = dst->clk_[i];
|
||||
dst->clk_[i] = clk_[i];
|
||||
clk_[i] = max(clk_[i], tmp);
|
||||
|
@ -103,7 +106,7 @@ void VectorClock::ReleaseStoreAcquire(VectorClock** dstp) {
|
|||
void VectorClock::ReleaseAcquire(VectorClock** dstp) {
|
||||
VectorClock* dst = AllocClock(dstp);
|
||||
#if !TSAN_VECTORIZE
|
||||
for (uptr i = 0; i < kMaxSid; i++) {
|
||||
for (uptr i = 0; i < kThreadSlotCount; i++) {
|
||||
dst->clk_[i] = max(dst->clk_[i], clk_[i]);
|
||||
clk_[i] = dst->clk_[i];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue