cross-platform define update
This commit is contained in:
@@ -12,7 +12,7 @@ namespace hgl
|
||||
*/
|
||||
class CondVar
|
||||
{
|
||||
void *cond_var;
|
||||
conv_var_ptr *cond_var;
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -9,14 +9,14 @@ namespace hgl
|
||||
*/
|
||||
class RWLock ///读写锁/共享锁
|
||||
{
|
||||
void *lock;
|
||||
rwlock_ptr *lock;
|
||||
|
||||
public:
|
||||
|
||||
RWLock();
|
||||
virtual ~RWLock();
|
||||
|
||||
void *GetRWLock(){ return lock; } ///<返回操作系级锁
|
||||
rwlock_ptr *GetRWLock(){ return lock; } ///<返回操作系级锁
|
||||
|
||||
bool TryReadLock(); ///<尝试读(共享访问)锁定
|
||||
bool ReadLock(); ///<读(共享访问)锁定
|
||||
|
@@ -1,9 +1,7 @@
|
||||
#ifndef HGL_SEMAPHORE_INCLUDE
|
||||
#define HGL_SEMAPHORE_INCLUDE
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include<dispatch/dispatch.h>
|
||||
#endif//__APPLE__
|
||||
#include<hgl/platform/Platform.h>
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
@@ -13,11 +11,7 @@ namespace hgl
|
||||
*/
|
||||
class Semaphore ///信号
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
dispatch_semaphore_t ptr;
|
||||
#else
|
||||
void *ptr;
|
||||
#endif//__APPLE__
|
||||
semaphore_ptr ptr;
|
||||
|
||||
public:
|
||||
|
||||
|
Reference in New Issue
Block a user