📄 mutex.h
字号:
/******************************************************************************
*******************************************************************************
** **
** Copyright (c) 2006 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
*******************************************************************************
******************************************************************************/
/**
* @file mutex.h
*
* $Revision: 1.5 $
*
* Implements a Mutual Exlusion (Mutex) object class
*
*/
#ifndef __MUTEX_H
#define __MUTEX_H
#if _MSC_VER
#include <windows.h>
#else
#include <pthread.h>
#endif
#include "error.h"
class Mutex
{
protected:
#if _MSC_VER
CRITICAL_SECTION criticalSection;
#else
pthread_mutex_t criticalSection;
#endif
public:
Mutex ( void );
VDVD_ERROR Lock ( void );
VDVD_ERROR Unlock ( void );
};
class AutoMutex
{
private:
Mutex* m_pMutex;
public:
AutoMutex ( Mutex* pMutex );
~AutoMutex ( void );
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -