Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

mutex_win32.cpp

Go to the documentation of this file.
00001 /*
00002         $Id: mutex_win32.cpp,v 1.1.1.1 2000/04/09 12:18:02 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00015 #include "Core/precomp.h"
00016 
00017 #include "mutex_win32.h"
00018 
00019 /*************************************
00020  Generic static create-mutex function
00021 *************************************/
00022 
00023 CL_Mutex *CL_Mutex::create()
00024 {
00025         return new CL_Mutex_Win32;
00026 }
00027 
00028 /*************************************
00029         class CL_Mutex_Win32
00030 *************************************/
00031 
00032 CL_Mutex_Win32::CL_Mutex_Win32()
00033 {
00034         InitializeCriticalSection(&mutex);
00035 }
00036 
00037 CL_Mutex_Win32::~CL_Mutex_Win32()
00038 {
00039         DeleteCriticalSection(&mutex);
00040 }
00041 
00042 void CL_Mutex_Win32::enter()
00043 {
00044         EnterCriticalSection(&mutex);
00045 }
00046 
00047 void CL_Mutex_Win32::leave()
00048 {
00049         LeaveCriticalSection(&mutex);
00050 }

Generated at Wed Apr 4 19:54:02 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001