From e7a9ea9e7d2e699f22614f1ae018baee1dbbae4b Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sat, 8 Feb 2020 15:03:07 +0800 Subject: [PATCH] Update code of Crossplatform redefine --- inc/hgl/platform/os/MSWindows.h | 2 +- inc/hgl/platform/os/PosixThread.h | 4 ++-- inc/hgl/proc/ProcMutex.h | 2 +- inc/hgl/thread/Semaphore.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/hgl/platform/os/MSWindows.h b/inc/hgl/platform/os/MSWindows.h index af1d17f..6d4d853 100644 --- a/inc/hgl/platform/os/MSWindows.h +++ b/inc/hgl/platform/os/MSWindows.h @@ -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 diff --git a/inc/hgl/platform/os/PosixThread.h b/inc/hgl/platform/os/PosixThread.h index a17d8d8..386c78f 100644 --- a/inc/hgl/platform/os/PosixThread.h +++ b/inc/hgl/platform/os/PosixThread.h @@ -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 diff --git a/inc/hgl/proc/ProcMutex.h b/inc/hgl/proc/ProcMutex.h index 262ea15..5818ae9 100644 --- a/inc/hgl/proc/ProcMutex.h +++ b/inc/hgl/proc/ProcMutex.h @@ -10,7 +10,7 @@ namespace hgl */ class ProcMutex ///进程排斥 { - proc_mutex_ptr *lock; + proc_mutex_ptr lock; public: diff --git a/inc/hgl/thread/Semaphore.h b/inc/hgl/thread/Semaphore.h index 650ff47..2408b4a 100644 --- a/inc/hgl/thread/Semaphore.h +++ b/inc/hgl/thread/Semaphore.h @@ -11,7 +11,7 @@ namespace hgl */ class Semaphore ///信号 { - semaphore_ptr *ptr; + semaphore_ptr ptr; public: