Update code of Crossplatform redefine
This commit is contained in:
parent
45f80fb7f7
commit
e7a9ea9e7d
@ -76,7 +76,7 @@ using thread_mutex_ptr =CRITICAL_SECTION;
|
|||||||
using thread_ptr =HANDLE;
|
using thread_ptr =HANDLE;
|
||||||
using rwlock_ptr =SRWLOCK;
|
using rwlock_ptr =SRWLOCK;
|
||||||
using semaphore_ptr =HANDLE;
|
using semaphore_ptr =HANDLE;
|
||||||
using conv_var_ptr =CONDITION_VARIABLE;
|
using cond_var_ptr =CONDITION_VARIABLE;
|
||||||
|
|
||||||
#define THREAD_FUNC DWORD WINAPI
|
#define THREAD_FUNC DWORD WINAPI
|
||||||
#define HGL_THREAD_DETACH_SELF
|
#define HGL_THREAD_DETACH_SELF
|
||||||
|
@ -18,7 +18,7 @@ namespace hgl
|
|||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
using semaphore_ptr =dispatch_semaphore_t *;
|
using semaphore_ptr =dispatch_semaphore_t *;
|
||||||
#else
|
#else
|
||||||
using semaphore_ptr =sem_t;
|
using semaphore_ptr =sem_t *;
|
||||||
#endif//
|
#endif//
|
||||||
|
|
||||||
using cond_var_ptr =pthread_cond_t;
|
using cond_var_ptr =pthread_cond_t;
|
||||||
@ -26,6 +26,6 @@ namespace hgl
|
|||||||
#define THREAD_FUNC void *
|
#define THREAD_FUNC void *
|
||||||
#define HGL_THREAD_DETACH_SELF pthread_detach(pthread_self());
|
#define HGL_THREAD_DETACH_SELF pthread_detach(pthread_self());
|
||||||
|
|
||||||
using proc_mutex_ptr =sem_t;
|
using proc_mutex_ptr =sem_t *;
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
#endif//HGL_POSIX_THREAD_INCLUDE
|
#endif//HGL_POSIX_THREAD_INCLUDE
|
||||||
|
@ -10,7 +10,7 @@ namespace hgl
|
|||||||
*/
|
*/
|
||||||
class ProcMutex ///进程排斥
|
class ProcMutex ///进程排斥
|
||||||
{
|
{
|
||||||
proc_mutex_ptr *lock;
|
proc_mutex_ptr lock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ namespace hgl
|
|||||||
*/
|
*/
|
||||||
class Semaphore ///信号
|
class Semaphore ///信号
|
||||||
{
|
{
|
||||||
semaphore_ptr *ptr;
|
semaphore_ptr ptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user