core: add rosetta support
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
#include <fx/core/misc.h>
|
#include <fx/core/misc.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
#if defined(__APPLE__) || defined(__linux__) || defined(__rosetta__)
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#define FX_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
|
#define FX_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#include <fx/core/bitop.h>
|
||||||
|
|
||||||
|
int fx_popcountl(long v)
|
||||||
|
{
|
||||||
|
return __builtin_popcountl(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
int fx_ctzl(long v)
|
||||||
|
{
|
||||||
|
return __builtin_ctzl(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
int fx_clzl(long v)
|
||||||
|
{
|
||||||
|
return __builtin_clzl(v);
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
uint64_t z__fx_platform_random_seed()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t z__fx_platform_random_seed_secure()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user