blob: 6f7cd3344e1781ed73ebb4e36b71e0c6183e63c3 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:251/*
henrike@webrtc.org9f847232012-09-25 20:27:512 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:253 *
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
phoglund@webrtc.org59ad5412012-12-18 15:20:3511#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WIN_H_
12#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WIN_H_
niklase@google.com470e71d2011-07-07 08:21:2513
phoglund@webrtc.org59ad5412012-12-18 15:20:3514#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
niklase@google.com470e71d2011-07-07 08:21:2515
16#include <Windows.h>
17
niklase@google.com470e71d2011-07-07 08:21:2518namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:2519
henrike@webrtc.org9f847232012-09-25 20:27:5120class RWLockWin : public RWLockWrapper {
21 public:
22 static RWLockWin* Create();
23 ~RWLockWin() {}
niklase@google.com470e71d2011-07-07 08:21:2524
henrike@webrtc.org9f847232012-09-25 20:27:5125 virtual void AcquireLockExclusive();
26 virtual void ReleaseLockExclusive();
niklase@google.com470e71d2011-07-07 08:21:2527
henrike@webrtc.org9f847232012-09-25 20:27:5128 virtual void AcquireLockShared();
29 virtual void ReleaseLockShared();
niklase@google.com470e71d2011-07-07 08:21:2530
henrike@webrtc.org9f847232012-09-25 20:27:5131 private:
32 RWLockWin();
33 static bool LoadModule();
niklase@google.com470e71d2011-07-07 08:21:2534
henrike@webrtc.org9f847232012-09-25 20:27:5135 SRWLOCK lock_;
niklase@google.com470e71d2011-07-07 08:21:2536};
niklase@google.com470e71d2011-07-07 08:21:2537
henrike@webrtc.org9f847232012-09-25 20:27:5138} // namespace webrtc
39
phoglund@webrtc.org59ad5412012-12-18 15:20:3540#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_WIN_H_