mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added BX_PLATFORM_POSIX.
This commit is contained in:
@@ -64,7 +64,7 @@ namespace bx
|
||||
void free(void* _obj)
|
||||
{
|
||||
uint16_t index = getIndex(_obj);
|
||||
BX_CHECK(index >= 0 && index < m_num, "index %d, m_num %d", index, m_num);
|
||||
BX_CHECK(index < m_num, "index %d, m_num %d", index, m_num);
|
||||
|
||||
*( (uint16_t*)_obj) = m_freeIndex;
|
||||
m_freeIndex = index;
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
# error "BX_PLATFORM_* is not defined!"
|
||||
#endif //
|
||||
|
||||
#define BX_PLATFORM_POSIX (BX_PLATFORM_NACL || BX_PLATFORM_ANDROID || BX_PLATFORM_LINUX || BX_PLATFORM_OSX || BX_PLATFORM_IOS)
|
||||
|
||||
// http://sourceforge.net/apps/mediawiki/predef/index.php?title=Architectures
|
||||
#if defined(__arm__)
|
||||
# undef BX_CPU_ARM
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
|
||||
#include "bx.h"
|
||||
|
||||
#define BX_SEM_CONFIG_POSIX (BX_PLATFORM_NACL || BX_PLATFORM_ANDROID || BX_PLATFORM_LINUX)
|
||||
|
||||
#if BX_SEM_CONFIG_POSIX
|
||||
#if BX_PLATFORM_POSIX
|
||||
# include <semaphore.h>
|
||||
# include <time.h>
|
||||
#elif BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360
|
||||
@@ -19,7 +17,7 @@
|
||||
|
||||
namespace bx
|
||||
{
|
||||
#if BX_SEM_CONFIG_POSIX
|
||||
#if BX_PLATFORM_POSIX
|
||||
class Semaphore
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user