blob: d97f1d7c7f6b8226abbd0a9f87b6c1a14c56ff23 [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.orga36d75a2012-11-14 09:55:04 +000012#include <windows.h>
13#include "condition_variable_win.h"
14#include "condition_variable_wrapper.h"
15#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
16#include <pthread.h>
17#include "condition_variable_posix.h"
18#include "condition_variable_wrapper.h"
ajm@google.comb5c49ff2011-08-01 17:04:04 +000019#endif
niklase@google.com470e71d2011-07-07 08:21:25 +000020
21namespace webrtc {
phoglund@webrtc.orga36d75a2012-11-14 09:55:04 +000022
23ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() {
niklase@google.com470e71d2011-07-07 08:21:25 +000024#if defined(_WIN32)
phoglund@webrtc.orga36d75a2012-11-14 09:55:04 +000025 return new ConditionVariableWindows;
andrew@webrtc.orgf3b65db2012-09-06 18:17:00 +000026#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
phoglund@webrtc.orga36d75a2012-11-14 09:55:04 +000027 return ConditionVariablePosix::Create();
niklase@google.com470e71d2011-07-07 08:21:25 +000028#else
phoglund@webrtc.orga36d75a2012-11-14 09:55:04 +000029 return NULL;
niklase@google.com470e71d2011-07-07 08:21:25 +000030#endif
31}
phoglund@webrtc.orga36d75a2012-11-14 09:55:04 +000032
niklase@google.com470e71d2011-07-07 08:21:25 +000033} // namespace webrtc