1 Star 0 Fork 0

lovelacelee / libco

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
co_comm.h 399 Bytes
Copy Edit Web IDE Raw Blame History
princewen authored 2020-10-27 16:24 . Add hook for gethostbyname_r
#pragma once
#include "co_routine.h"
class clsCoMutex {
public:
clsCoMutex();
~clsCoMutex();
void CoLock();
void CoUnLock();
private:
stCoCond_t* m_ptCondSignal;
int m_iWaitItemCnt;
};
class clsSmartLock {
public:
clsSmartLock(clsCoMutex* m) {
m_ptMutex = m;
m_ptMutex->CoLock();
}
~clsSmartLock() { m_ptMutex->CoUnLock(); }
private:
clsCoMutex* m_ptMutex;
};

Comment ( 0 )

Sign in for post a comment

1
https://gitee.com/lovelacelee/libco.git
git@gitee.com:lovelacelee/libco.git
lovelacelee
libco
libco
master

Search