Update code of Crossplatform redefine

This commit is contained in:
hyzboy 2020-02-08 15:03:07 +08:00
parent 45f80fb7f7
commit e7a9ea9e7d
4 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ using thread_mutex_ptr =CRITICAL_SECTION;
using thread_ptr =HANDLE;
using rwlock_ptr =SRWLOCK;
using semaphore_ptr =HANDLE;
using conv_var_ptr =CONDITION_VARIABLE;
using cond_var_ptr =CONDITION_VARIABLE;
#define THREAD_FUNC DWORD WINAPI
#define HGL_THREAD_DETACH_SELF

View File

@ -18,7 +18,7 @@ namespace hgl
#ifdef __APPLE__
using semaphore_ptr =dispatch_semaphore_t *;
#else
using semaphore_ptr =sem_t;
using semaphore_ptr =sem_t *;
#endif//
using cond_var_ptr =pthread_cond_t;
@ -26,6 +26,6 @@ namespace hgl
#define THREAD_FUNC void *
#define HGL_THREAD_DETACH_SELF pthread_detach(pthread_self());
using proc_mutex_ptr =sem_t;
using proc_mutex_ptr =sem_t *;
}//namespace hgl
#endif//HGL_POSIX_THREAD_INCLUDE

View File

@ -10,7 +10,7 @@ namespace hgl
*/
class ProcMutex ///进程排斥
{
proc_mutex_ptr *lock;
proc_mutex_ptr lock;
public:

View File

@ -11,7 +11,7 @@ namespace hgl
*/
class Semaphore ///信号
{
semaphore_ptr *ptr;
semaphore_ptr ptr;
public: