blob: 1b4511d85b1b19cb3ca2d5f5b630a4c895b1d9ca [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#if defined(_WIN32)
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000012#include <windows.h>
13#include "webrtc/system_wrappers/source/critical_section_win.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000014#else
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000015#include "webrtc/system_wrappers/source/critical_section_posix.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016#endif
17
18namespace webrtc {
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000019
20CriticalSectionWrapper* CriticalSectionWrapper::CreateCriticalSection() {
niklase@google.com470e71d2011-07-07 08:21:25 +000021#ifdef _WIN32
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000022 return new CriticalSectionWindows();
niklase@google.com470e71d2011-07-07 08:21:25 +000023#else
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000024 return new CriticalSectionPosix();
niklase@google.com470e71d2011-07-07 08:21:25 +000025#endif
26}
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000027
niklase@google.com470e71d2011-07-07 08:21:25 +000028} // namespace webrtc