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

Unified Diff: webrtc/base/sigslot.cc

Issue 2509733003: Rewrite of sigslot that avoids vtables. (Closed)
Patch Set: Going back to tab formatting. Created 4 years, 1 month 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/base/sigslot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/sigslot.cc
diff --git a/webrtc/base/sigslot.cc b/webrtc/base/sigslot.cc
index 9628217dc0729b0847c97a4567650beae235afd8..11642c16e242dec106c1852945a6f115a86e2042 100644
--- a/webrtc/base/sigslot.cc
+++ b/webrtc/base/sigslot.cc
@@ -12,43 +12,8 @@ namespace sigslot {
#ifdef _SIGSLOT_HAS_POSIX_THREADS
-multi_threaded_global::multi_threaded_global() {
- pthread_mutex_init(get_mutex(), NULL);
-}
-
-multi_threaded_global::multi_threaded_global(const multi_threaded_global&) {
-}
-
-multi_threaded_global::~multi_threaded_global() = default;
-
-void multi_threaded_global::lock() {
- pthread_mutex_lock(get_mutex());
-}
-
-void multi_threaded_global::unlock() {
- pthread_mutex_unlock(get_mutex());
-}
-
-multi_threaded_local::multi_threaded_local() {
- pthread_mutex_init(&m_mutex, NULL);
-}
-
-multi_threaded_local::multi_threaded_local(const multi_threaded_local&) {
- pthread_mutex_init(&m_mutex, NULL);
-}
-
-multi_threaded_local::~multi_threaded_local() {
- pthread_mutex_destroy(&m_mutex);
-}
-
-void multi_threaded_local::lock() {
- pthread_mutex_lock(&m_mutex);
-}
-
-void multi_threaded_local::unlock() {
- pthread_mutex_unlock(&m_mutex);
-}
+pthread_mutex_t multi_threaded_global::g_mutex = PTHREAD_MUTEX_INITIALIZER;
Taylor Brandstetter 2016/11/16 21:57:33 We'll probably need to change this due to Chromium
#endif // _SIGSLOT_HAS_POSIX_THREADS
-}; // namespace sigslot
+} // namespace sigslot
« no previous file with comments | « webrtc/base/sigslot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698