blob: 7acb0076019e74989fcf84457f9349af9ef92edb [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#include "webrtc/system_wrappers/source/critical_section_win.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000012
13namespace webrtc {
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000014
15CriticalSectionWindows::CriticalSectionWindows() {
16 InitializeCriticalSection(&crit);
niklase@google.com470e71d2011-07-07 08:21:25 +000017}
18
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000019CriticalSectionWindows::~CriticalSectionWindows() {
20 DeleteCriticalSection(&crit);
niklase@google.com470e71d2011-07-07 08:21:25 +000021}
22
23void
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000024CriticalSectionWindows::Enter() {
25 EnterCriticalSection(&crit);
niklase@google.com470e71d2011-07-07 08:21:25 +000026}
27
28void
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000029CriticalSectionWindows::Leave() {
30 LeaveCriticalSection(&crit);
niklase@google.com470e71d2011-07-07 08:21:25 +000031}
phoglund@webrtc.org99f7c912012-11-30 10:44:49 +000032
niklase@google.com470e71d2011-07-07 08:21:25 +000033} // namespace webrtc