Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CAT/CATCritSec_Win32.cpp Source File

CATCritSec_Win32.cpp

Go to the documentation of this file.
00001 /// \file    CATCritSec_Win32.cpp
00002 /// \brief   Win32 version of critical sections for thread synchronization.
00003 /// \ingroup CAT
00004 ///
00005 /// Copyright (c) 2008 by Michael Ellison.
00006 /// See COPYING.txt for the \ref gaslicense License (MIT License).
00007 ///
00008 // $Author: mikeellison $
00009 // $Date: 2008-01-26 03:19:45 -0600 (Sat, 26 Jan 2008) $
00010 // $Revision:   $
00011 // $NoKeywords: $
00012 
00013 #include "CATCritSec.h"
00014 
00015 CATCritSec::CATCritSec()
00016 {
00017     ::InitializeCriticalSectionAndSpinCount(&fCritSec,4000);
00018 }
00019 
00020 CATCritSec::~CATCritSec()
00021 {
00022     DeleteCriticalSection(&fCritSec);
00023 }
00024 
00025 void CATCritSec::Wait()
00026 {
00027     EnterCriticalSection(&fCritSec);
00028 }
00029 
00030 void CATCritSec::Release()
00031 {
00032     LeaveCriticalSection(&fCritSec);
00033 }

Generated on Mon Feb 11 04:09:42 2008 for Game Accessibility Suite by doxygen 1.5.4