feat: add rpmalloc

This commit is contained in:
sisungo committed 2026-02-23 13:16:42 +08:00
1 parent 9ed6813222
commit 475334f2db
10 files changed
+3843 -10

No files matched your search

+3 -4
View File
@@ -26,7 +26,6 @@
*
* $FreeBSD: src/include/stdatomic.h,v 1.10.2.2 2012/05/30 19:21:54 theraven Exp $
*/
#ifndef _STDATOMIC_H_
#define _STDATOMIC_H_
@@ -250,7 +249,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
#else
#define atomic_compare_exchange_strong_explicit(object, expected, \
desired, success, failure) ({ \
__typeof__((object)->__val) __v; \
__typeof__(*(object)) __v; \
_Bool __r; \
__v = __sync_val_compare_and_swap(object, \
*(expected), desired); \
@@ -274,7 +273,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
* it.
*/
#define atomic_exchange_explicit(object, desired, order) ({ \
__typeof__((object)->__val) __v; \
__typeof__(*(object)) __v; \
__v = __sync_lock_test_and_set(object, desired); \
__sync_synchronize(); \
__v; \
@@ -294,7 +293,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
__sync_fetch_and_add(object, 0)
#define atomic_store_explicit(object, desired, order) do { \
__sync_synchronize(); \
(object)->__val = (desired); \
*(object) = (desired); \
__sync_synchronize(); \
} while (0)
#endif