 Chromium Code Reviews
 Chromium Code Reviews Issue 2509733003:
  Rewrite of sigslot that avoids vtables.  (Closed)
    
  
    Issue 2509733003:
  Rewrite of sigslot that avoids vtables.  (Closed) 
  | 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 |