Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

mclcritsec.h

Go to the documentation of this file.
00001 /********************************************************************
00002        Copyright (c) 2001, Lee Patterson & Ant Works Software
00003        http://ssobjects.sourceforge.net
00004 
00005        Original source from Win32 Multithreaded Programming
00006        Copyright (c) 1997 by Aaron Michael Cohen and Mike Woodring
00007 
00008        filename :  mclcritsec.cpp
00009        author   :  Lee Patterson (lee@antws.com)
00010 
00011        purpose  :  Supplies functionality found in MclThread win32 libs. Not all
00012                    functionality has been brought across. The critical section
00013                    is impliemented as a mutex as Linux doesn't have a kernel
00014                    CRITICAL section. This is to maintain compatibility with
00015                    existing code.
00016 *********************************************************************/
00017 
00018 #ifndef __CMCLCRITSEC_H__
00019 #define __CMCLCRITSEC_H__
00020 
00021 //#include "msdefs.h"
00022 # include <pthread.h>
00023 
00024 namespace ssobjects
00025 {
00026 
00027 class CMclCritSec 
00028 {
00029 public:
00030     CMclCritSec();          // constructor creates a CRITICAL_SECTION inside the C++ object...
00031     CMclCritSec(const CMclCritSec&);  // copy constructor creates a new critsec, doesn't copy an existing one.
00032     virtual ~CMclCritSec(); // destructor...
00033 
00034     CMclCritSec& operator=(const CMclCritSec& c);
00035 
00036     void Enter(void);       
00037     void Leave(void);       
00038 
00039     
00040 private:
00041     pthread_mutex_t m_mutexCritSec;
00042 };
00043 
00044 };
00045 
00046 #endif
00047 

Generated on Thu Nov 8 12:39:25 2001 for SimpleServerObjects by doxygen1.2.11 written by Dimitri van Heesch, © 1997-2001