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

Unified Diff: webrtc/system_wrappers/source/critical_section.cc

Issue 1614373002: Remove implementation of CriticalSectionWrapper and use rtc::CriticalSection (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix impl Created 4 years, 11 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/system_wrappers/source/critical_section.cc
diff --git a/webrtc/system_wrappers/source/critical_section.cc b/webrtc/system_wrappers/source/critical_section.cc
deleted file mode 100644
index a8a5a6d40b7bdff06b42585884463d0f109c825c..0000000000000000000000000000000000000000
--- a/webrtc/system_wrappers/source/critical_section.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
-
-namespace webrtc {
-
-CriticalSectionWrapper* CriticalSectionWrapper::CreateCriticalSection() {
- return new CriticalSectionWrapper();
-}
-
-#if defined (WEBRTC_WIN)
-
-CriticalSectionWrapper::CriticalSectionWrapper() {
- InitializeCriticalSection(&crit_);
-}
-
-CriticalSectionWrapper::~CriticalSectionWrapper() {
- DeleteCriticalSection(&crit_);
-}
-
-void CriticalSectionWrapper::Enter() {
- EnterCriticalSection(&crit_);
-}
-
-void CriticalSectionWrapper::Leave() {
- LeaveCriticalSection(&crit_);
-}
-
-#else
-
-CriticalSectionWrapper::CriticalSectionWrapper() {
- pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr);
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- pthread_mutex_init(&mutex_, &attr);
-}
-
-CriticalSectionWrapper::~CriticalSectionWrapper() {
- pthread_mutex_destroy(&mutex_);
-}
-
-void CriticalSectionWrapper::Enter() {
- pthread_mutex_lock(&mutex_);
-}
-
-void CriticalSectionWrapper::Leave() {
- pthread_mutex_unlock(&mutex_);
-}
-
-#endif
-
-} // namespace webrtc
« no previous file with comments | « webrtc/system_wrappers/include/critical_section_wrapper.h ('k') | webrtc/system_wrappers/system_wrappers.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698