Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: webrtc/modules/pacing/packet_router.cc

Issue 1498953002: Reland of "Create rtc::AtomicInt POD struct." (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: initializer to audio_device_ios.mm Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/pacing/packet_router.h ('k') | webrtc/system_wrappers/include/trace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/packet_router.cc
diff --git a/webrtc/modules/pacing/packet_router.cc b/webrtc/modules/pacing/packet_router.cc
index 5fd350834a5e1ec6231966d0e7e207f79b5e5b99..301585fb960cad5b2303a348420d2b8b4c98a27e 100644
--- a/webrtc/modules/pacing/packet_router.cc
+++ b/webrtc/modules/pacing/packet_router.cc
@@ -18,8 +18,7 @@
namespace webrtc {
-PacketRouter::PacketRouter() : transport_seq_(0) {
-}
+PacketRouter::PacketRouter() : transport_seq_({0}) {}
PacketRouter::~PacketRouter() {
RTC_DCHECK(rtp_modules_.empty());
@@ -69,11 +68,11 @@ size_t PacketRouter::TimeToSendPadding(size_t bytes_to_send) {
}
void PacketRouter::SetTransportWideSequenceNumber(uint16_t sequence_number) {
- rtc::AtomicOps::ReleaseStore(&transport_seq_, sequence_number);
+ rtc::AtomicInt::ReleaseStore(&transport_seq_, sequence_number);
}
uint16_t PacketRouter::AllocateSequenceNumber() {
- int prev_seq = rtc::AtomicOps::AcquireLoad(&transport_seq_);
+ int prev_seq = rtc::AtomicInt::AcquireLoad(&transport_seq_);
int desired_prev_seq;
int new_seq;
do {
@@ -83,7 +82,7 @@ uint16_t PacketRouter::AllocateSequenceNumber() {
// time the CAS operation was executed. Thus, if prev_seq is returned, the
// operation was successful - otherwise we need to retry. Saving the
// return value saves us a load on retry.
- prev_seq = rtc::AtomicOps::CompareAndSwap(&transport_seq_, desired_prev_seq,
+ prev_seq = rtc::AtomicInt::CompareAndSwap(&transport_seq_, desired_prev_seq,
new_seq);
} while (prev_seq != desired_prev_seq);
« no previous file with comments | « webrtc/modules/pacing/packet_router.h ('k') | webrtc/system_wrappers/include/trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698