meta: rename to fx

This commit is contained in:
2026-03-16 10:35:43 +00:00
parent 84df46489a
commit e9d0e323f0
233 changed files with 12875 additions and 12869 deletions

View File

@@ -1,16 +1,16 @@
#include <blue/core/bitop.h>
#include <fx/core/bitop.h>
int b_popcountl(long v)
int fx_popcountl(long v)
{
return __builtin_popcountl(v);
}
int b_ctzl(long v)
int fx_ctzl(long v)
{
return __builtin_ctzl(v);
}
int b_clzl(long v)
int fx_clzl(long v)
{
return __builtin_clzl(v);
}

View File

@@ -2,7 +2,7 @@
#include <stdint.h>
#include <unistd.h>
uint64_t z__b_platform_random_seed()
uint64_t z__fx_platform_random_seed()
{
int fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
@@ -18,7 +18,7 @@ uint64_t z__b_platform_random_seed()
return v;
}
uint64_t z__b_platform_random_seed_secure()
uint64_t z__fx_platform_random_seed_secure()
{
int fd = open("/dev/random", O_RDONLY);
if (fd == -1) {

View File

@@ -1,20 +1,20 @@
#include <assert.h>
#include <blue/core/error.h>
#include <blue/core/thread.h>
#include <fx/core/error.h>
#include <fx/core/thread.h>
#include <stdlib.h>
#include <string.h>
struct b_thread {
struct fx_thread {
pthread_t thr_p;
b_result thr_result;
fx_result thr_result;
};
static b_once thread_tls_init_once = B_ONCE_INIT;
static fx_once thread_tls_init_once = FX_ONCE_INIT;
static pthread_key_t thread_tls_key = {0};
static void thread_dtor(void *p)
{
struct b_thread *thread = p;
struct fx_thread *thread = p;
}
static void thread_tls_init()
@@ -22,13 +22,13 @@ static void thread_tls_init()
pthread_key_create(&thread_tls_key, thread_dtor);
}
struct b_thread *b_thread_self(void)
struct fx_thread *fx_thread_self(void)
{
if (b_init_once(&thread_tls_init_once)) {
if (fx_init_once(&thread_tls_init_once)) {
thread_tls_init();
}
struct b_thread *thread = pthread_getspecific(thread_tls_key);
struct fx_thread *thread = pthread_getspecific(thread_tls_key);
if (thread) {
return thread;
}
@@ -45,17 +45,17 @@ struct b_thread *b_thread_self(void)
return thread;
}
bool b_mutex_lock(b_mutex *mut)
bool fx_mutex_lock(fx_mutex *mut)
{
return pthread_mutex_lock(mut) == 0;
}
bool b_mutex_trylock(b_mutex *mut)
bool fx_mutex_trylock(fx_mutex *mut)
{
return pthread_mutex_trylock(mut) == 0;
}
bool b_mutex_unlock(b_mutex *mut)
bool fx_mutex_unlock(fx_mutex *mut)
{
return pthread_mutex_unlock(mut) == 0;
}

View File

@@ -1,16 +1,16 @@
#include <blue/core/bitop.h>
#include <fx/core/bitop.h>
int b_popcountl(long v)
int fx_popcountl(long v)
{
return __builtin_popcountl(v);
}
int b_ctzl(long v)
int fx_ctzl(long v)
{
return __builtin_ctzl(v);
}
int b_clzl(long v)
int fx_clzl(long v)
{
return __builtin_clzl(v);
}

View File

@@ -2,7 +2,7 @@
#include <stdint.h>
#include <unistd.h>
uint64_t z__b_platform_random_seed()
uint64_t z__fx_platform_random_seed()
{
int fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
@@ -18,7 +18,7 @@ uint64_t z__b_platform_random_seed()
return v;
}
uint64_t z__b_platform_random_seed_secure()
uint64_t z__fx_platform_random_seed_secure()
{
int fd = open("/dev/random", O_RDONLY);
if (fd == -1) {

View File

@@ -1,4 +1,4 @@
#include <blue/core/bitop.h>
#include <fx/core/bitop.h>
#include <intrin.h>
#include <assert.h>
@@ -16,7 +16,7 @@ static int check_popcnt_support()
return (d[2] & 0x800000) ? CPU_FEATURE_YES : CPU_FEATURE_NO;
}
int b_popcountl(long v)
int fx_popcountl(long v)
{
if (cpu_supports_popcnt == CPU_FEATURE_UNKNOWN) {
cpu_supports_popcnt = check_popcnt_support();
@@ -34,7 +34,7 @@ int b_popcountl(long v)
return 0;
}
int b_ctzl(long v)
int fx_ctzl(long v)
{
unsigned long trailing_zero = 0;
@@ -51,7 +51,7 @@ int b_ctzl(long v)
}
}
int b_clzl(long v)
int fx_clzl(long v)
{
unsigned long leading_zero = 0;

View File

@@ -5,7 +5,7 @@
#include <Windows.h>
#include <wincrypt.h>
uint64_t z__b_platform_random_seed_secure(void)
uint64_t z__fx_platform_random_seed_secure(void)
{
BOOL status;
HCRYPTPROV hCryptProv;
@@ -24,7 +24,7 @@ uint64_t z__b_platform_random_seed_secure(void)
return status == TRUE ? v : (uint64_t)-1;
}
uint64_t z__b_platform_random_seed(void)
uint64_t z__fx_platform_random_seed(void)
{
return z__b_platform_random_seed_secure();
return z__fx_platform_random_seed_secure();
}