Index: webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h |
diff --git a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h |
index 11397c1c597ab9bde4a5633a25dd9994534d244a..fdf66ad04d329598936cac9f0db621f997eed500 100644 |
--- a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h |
+++ b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h |
@@ -13,10 +13,10 @@ |
#include <deque> |
+#include "webrtc/base/atomicops.h" |
#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/common_types.h" |
#include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
-#include "webrtc/system_wrappers/interface/atomic32.h" |
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h" |
#include "webrtc/system_wrappers/interface/event_wrapper.h" |
#include "webrtc/system_wrappers/interface/sleep.h" |
@@ -55,8 +55,9 @@ class LoopBackTransport : public webrtc::Transport { |
enum { |
kSleepIntervalMs = 10 |
}; |
- int32_t limit = transmitted_packets_.Value() + packet_count; |
- while (transmitted_packets_.Value() < limit) { |
+ int32_t limit = |
+ rtc::AtomicOps::AcquireLoad(&transmitted_packets_) + packet_count; |
+ while (rtc::AtomicOps::AcquireLoad(&transmitted_packets_) < limit) { |
webrtc::SleepMs(kSleepIntervalMs); |
} |
} |
@@ -138,7 +139,7 @@ class LoopBackTransport : public webrtc::Transport { |
voe_network_->ReceivedRTCPPacket(channel, p.data, p.len); |
break; |
} |
- ++transmitted_packets_; |
+ rtc::AtomicOps::Increment(&transmitted_packets_); |
} |
return true; |
} |
@@ -150,7 +151,7 @@ class LoopBackTransport : public webrtc::Transport { |
const int channel_; |
std::map<uint32_t, int> channels_ GUARDED_BY(crit_.get()); |
webrtc::VoENetwork* const voe_network_; |
- webrtc::Atomic32 transmitted_packets_; |
+ volatile int transmitted_packets_; |
}; |
// This fixture initializes the voice engine in addition to the work |