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

Unified Diff: webrtc/test/channel_transport/udp_socket2_manager_win.h

Issue 1347793005: Replace Atomic32 with webrtc/base/atomicops.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix typo Created 5 years, 3 months 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
Index: webrtc/test/channel_transport/udp_socket2_manager_win.h
diff --git a/webrtc/test/channel_transport/udp_socket2_manager_win.h b/webrtc/test/channel_transport/udp_socket2_manager_win.h
index 7e4e805d0c241da46f6903ec72a727e4efcf0269..5846ad591b87004b300d0eec609f31e8837337e8 100644
--- a/webrtc/test/channel_transport/udp_socket2_manager_win.h
+++ b/webrtc/test/channel_transport/udp_socket2_manager_win.h
@@ -14,7 +14,7 @@
#include <winsock2.h>
#include <list>
-#include "webrtc/system_wrappers/interface/atomic32.h"
+#include "webrtc/base/atomicops.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/event_wrapper.h"
#include "webrtc/system_wrappers/interface/thread_wrapper.h"
@@ -76,8 +76,9 @@ public:
// Re-use an old unused IO context or create a new one.
virtual PerIoContext* PopIoContext();
virtual int32_t PushIoContext(PerIoContext* pIoContext);
- virtual inline int32_t GetSize(uint32_t* inUse = 0)
- {return _size.Value();}
+ virtual inline int32_t GetSize(uint32_t* inUse = 0) {
+ return rtc::AtomicOps::AcquireLoad(&_size);
+ }
virtual int32_t Free();
private:
// Sample code for use of msfts single linked atomic list can be found here:
@@ -87,8 +88,8 @@ private:
PSLIST_HEADER _pListHead;
bool _init;
- Atomic32 _size;
- Atomic32 _inUse;
+ volatile int _size;
+ volatile int _inUse;
};
class UdpSocket2WorkerWindows

Powered by Google App Engine
This is Rietveld 408576698