|
//
// MutexClass.h: header file
//
// Copyright (C) Walter E. Capers. All rights reserved
//
// This source is free to use as you like. If you make
// any changes please keep me in the loop. Email them to
// walt.capers@comcast.net.
//
// PURPOSE:
//
// To implement mutexes as a C++ object
//
// REVISIONS
// =======================================================
// Date: 10.25.07
// Name: Walter E. Capers
// Description: File creation
//
// Date:
// Name:
// Description:
//
//
#ifndef MUTEX_CLASS
#define MUTEX_CLASS
#ifndef WINDOWS
#if defined(WIN32) || defined(WIN64)
#define WINDOWS
#endif
#endif
#ifndef WINDOWS
#include <pthread.h>
#endif
#include "Thread.h"
class CMutexClass
{
private:
#ifdef WINDOWS
HANDLE m_mutex;
#else
pthread_mutex_t m_mutex;
#endif
ThreadId_t m_owner;
public:
BOOL m_bCreated;
void Lock();
void Unlock();
CMutexClass(void);
~CMutexClass(void);
};
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Currently I am a Software Architect for Compuware specializing in software security
Languages: C/C++, FORTRAN, COBOL, Java
Libraries: OpenGL, MFC, X11 (X-Windows), WIN32
Platform Experience: AIX, HP-UX, SunOS, Open VMS, AS400, OSF, AIX, SGI, Linux, Windows CE, Windows
I have a strong background in 3D graphics programming, TCP/IP development, threading, cross platform development, encryption and secured communications, and system level programming.
In the early years before OpenGL made its way to the PC world, I authored one of the first high performance double buffered 3D graphics engines that supported both DOS and Windows providing real time 3D graphics for Engineering Technology Associate’s Finite Element Model Builder, FEMB. You can see their products at www.eta.com.
I also hold a US patent http://www.patentstorm.us/patents/6894690.html