niklase@google.com | f0779a2 | 2011-05-30 11:39:38 +0000 | [diff] [blame] | 1 | /* |
| 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" |
| 14 | #include "condition_variable_windows.h" |
| 15 | #elif defined(WEBRTC_LINUX) |
| 16 | #include <pthread.h> |
| 17 | #include "condition_variable_wrapper.h" |
| 18 | #include "condition_variable_linux.h" |
| 19 | #elif defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL) |
| 20 | #include <pthread.h> |
| 21 | #include "condition_variable_wrapper.h" |
| 22 | #include "condition_variable_linux.h" |
| 23 | #endif |
| 24 | |
| 25 | namespace webrtc { |
| 26 | ConditionVariableWrapper* |
| 27 | ConditionVariableWrapper::CreateConditionVariable() |
| 28 | { |
| 29 | #if defined(_WIN32) |
| 30 | return new ConditionVariableWindows; |
| 31 | #elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL) |
| 32 | return ConditionVariableLinux::Create(); |
| 33 | #else |
| 34 | return NULL; |
| 35 | #endif |
| 36 | } |
| 37 | } // namespace webrtc |