blob: d67608c61d2925ada8dfc75164240051c65a3139 [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)
12 #include <windows.h>
13 #include "condition_variable_wrapper.h"
andrew@webrtc.org59ccd5c2011-12-15 00:17:43 +000014 #include "condition_variable_win.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000015#elif defined(WEBRTC_LINUX)
16 #include <pthread.h>
17 #include "condition_variable_wrapper.h"
ajm@google.comb5c49ff2011-08-01 17:04:04 +000018 #include "condition_variable_posix.h"
andrew@webrtc.orgf3b65db2012-09-06 18:17:00 +000019#elif defined(WEBRTC_MAC)
niklase@google.com470e71d2011-07-07 08:21:25 +000020 #include <pthread.h>
21 #include "condition_variable_wrapper.h"
ajm@google.comb5c49ff2011-08-01 17:04:04 +000022 #include "condition_variable_posix.h"
23#endif
niklase@google.com470e71d2011-07-07 08:21:25 +000024
25namespace webrtc {
26ConditionVariableWrapper*
27ConditionVariableWrapper::CreateConditionVariable()
28{
29#if defined(_WIN32)
30 return new ConditionVariableWindows;
andrew@webrtc.orgf3b65db2012-09-06 18:17:00 +000031#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
ajm@google.comb5c49ff2011-08-01 17:04:04 +000032 return ConditionVariablePosix::Create();
niklase@google.com470e71d2011-07-07 08:21:25 +000033#else
34 return NULL;
35#endif
36}
37} // namespace webrtc