mirror of
https://github.com/wu736139669/SmallGame_Cocos2dx.git
synced 2026-08-07 06:52:07 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/********************************************************************
|
||||
created: 2014/04/01
|
||||
filename: CriSection.h
|
||||
author: 王少培
|
||||
purpose:
|
||||
*********************************************************************/
|
||||
#include "CriSection.h"
|
||||
|
||||
CriSectionLock::CriSectionLock()
|
||||
{
|
||||
pthread_mutex_init(&mMutex,NULL);
|
||||
}
|
||||
|
||||
CriSectionLock::~CriSectionLock()
|
||||
{
|
||||
pthread_mutex_destroy(&mMutex);
|
||||
}
|
||||
|
||||
void CriSectionLock::enter()
|
||||
{
|
||||
pthread_mutex_lock(&mMutex);
|
||||
}
|
||||
|
||||
void CriSectionLock::leave()
|
||||
{
|
||||
pthread_mutex_unlock(&mMutex);
|
||||
}
|
||||
Reference in New Issue
Block a user