2011-07-07 08:21:25 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2012-11-30 10:44:49 +00:00
|
|
|
#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
|
|
|
|
|
#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
#include <windows.h>
|
2015-10-28 18:17:40 +01:00
|
|
|
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
|
2013-05-27 15:07:45 +00:00
|
|
|
#include "webrtc/typedefs.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2012-11-30 10:44:49 +00:00
|
|
|
class CriticalSectionWindows : public CriticalSectionWrapper {
|
|
|
|
|
public:
|
|
|
|
|
CriticalSectionWindows();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-11-30 10:44:49 +00:00
|
|
|
virtual ~CriticalSectionWindows();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-11-30 10:44:49 +00:00
|
|
|
virtual void Enter();
|
|
|
|
|
virtual void Leave();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-11-30 10:44:49 +00:00
|
|
|
private:
|
|
|
|
|
CRITICAL_SECTION crit;
|
|
|
|
|
|
2013-03-26 14:16:05 +00:00
|
|
|
friend class ConditionVariableEventWin;
|
|
|
|
|
friend class ConditionVariableNativeWin;
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
2012-11-30 10:44:49 +00:00
|
|
|
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-11-30 10:44:49 +00:00
|
|
|
#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
|