cross-platform define update

This commit is contained in:
2019-12-10 14:38:29 +08:00
parent 2d8da351ba
commit 1bfb503e13
6 changed files with 25 additions and 14 deletions

View File

@@ -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: