blob: 01bb52c4a2f115b2b7867a67547a186a89f3c925 [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
32 friend class ConditionVariableWindows;
niklase@google.com470e71d2011-07-07 08:21:25 +000033};
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000034
niklase@google.com470e71d2011-07-07 08:21:25 +000035} // namespace webrtc
36
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000037#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_