⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lmutexsemaphore.h

📁 vc环境下的pgp源码
💻 H
字号:
/*____________________________________________________________________________
	Copyright (C) 1996-1999 Network Associates, Inc.
	All rights reserved.

	$Id: LMutexSemaphore.h,v 1.4 1999/03/10 02:44:02 heller Exp $
____________________________________________________________________________*/
#ifndef LMUTEXSEMAPHORE_H
#define LMUTEXSEMAPHORE_H

#include "LSemaphore.h"

class LMutexSemaphore;

class LMutexSemaphore : public LSemaphore 
{
public:
					LMutexSemaphore(void);
					LMutexSemaphore(LMutexSemaphore &mutex)
						{	mMutex = mutex.mMutex;	}
	virtual			~LMutexSemaphore(void);
	
	inline virtual void		Signal(void);
	inline virtual short	Wait(long milliSeconds = semaphore_WaitForever);
private:
	HANDLE		mMutex;		// mutex handle for Win32 API calls
};

class StMutex : public LMutexSemaphore	// stack-based mutex
{
public:
				StMutex(LMutexSemaphore &mutex);
	virtual		~StMutex(void)
					{	mMutex.Signal();	}
private:
	LMutexSemaphore	&mMutex;
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -