blob: fb464192a37bb797a0e368104bba0936ce5b9900 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
leozwang@webrtc.org785db5a2012-02-28 23:10:03 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
Karl Wiberg2b857922018-03-23 14:53:54 +010011#include "rtc_base/synchronization/rw_lock_wrapper.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000012
tommi@webrtc.orgfe196992015-02-07 22:35:54 +000013#if defined(_WIN32)
Karl Wiberg2b857922018-03-23 14:53:54 +010014#include "rtc_base/synchronization/rw_lock_win.h"
tommi@webrtc.orgfe196992015-02-07 22:35:54 +000015#else
Karl Wiberg2b857922018-03-23 14:53:54 +010016#include "rtc_base/synchronization/rw_lock_posix.h"
tommi@webrtc.orgfe196992015-02-07 22:35:54 +000017#endif
niklase@google.com470e71d2011-07-07 08:21:25 +000018
19namespace webrtc {
henrike@webrtc.org9f847232012-09-25 20:27:51 +000020
pbos@webrtc.org75025432015-02-06 08:32:32 +000021RWLockWrapper* RWLockWrapper::CreateRWLock() {
tommi@webrtc.orgfe196992015-02-07 22:35:54 +000022#ifdef _WIN32
kthelgasonff046c72017-03-31 02:03:55 -070023 return RWLockWin::Create();
tommi@webrtc.orgfe196992015-02-07 22:35:54 +000024#else
25 return RWLockPosix::Create();
26#endif
niklase@google.com470e71d2011-07-07 08:21:25 +000027}
28
henrike@webrtc.org9f847232012-09-25 20:27:51 +000029} // namespace webrtc