blob: 760cc10f1e53d87f5c71081be5d10980c5b85c32 [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
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000011#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
12#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000014#include "webrtc/typedefs.h"
15#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016#include <windows.h>
17
18namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000019
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000020class CriticalSectionWindows : public CriticalSectionWrapper {
21 public:
22 CriticalSectionWindows();
niklase@google.com470e71d2011-07-07 08:21:25 +000023
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000024 virtual ~CriticalSectionWindows();
niklase@google.com470e71d2011-07-07 08:21:25 +000025
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000026 virtual void Enter();
27 virtual void Leave();
niklase@google.com470e71d2011-07-07 08:21:25 +000028
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000029 private:
30 CRITICAL_SECTION crit;
31
henrike@webrtc.org686001d2013-03-26 14:16:05 +000032 friend class ConditionVariableEventWin;
33 friend class ConditionVariableNativeWin;
niklase@google.com470e71d2011-07-07 08:21:25 +000034};
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000035
niklase@google.com470e71d2011-07-07 08:21:25 +000036} // namespace webrtc
37
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000038#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_