diff options
Diffstat (limited to 'src/defines.h')
-rw-r--r-- | src/defines.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/defines.h b/src/defines.h index a16d68e..689eeca 100644 --- a/src/defines.h +++ b/src/defines.h @@ -42,6 +42,8 @@ _Static_assert(sizeof(ptrdiff_t) == 8, "type ptrdiff_t should be 8 bytes"); #define alignof(x) _Alignof(x) +#define threadlocal _Thread_local + // Wrap a u32 to make a type-safe "handle" or ID #define CORE_DEFINE_HANDLE(name) \ typedef struct name name; \ @@ -49,13 +51,14 @@ _Static_assert(sizeof(ptrdiff_t) == 8, "type ptrdiff_t should be 8 bytes"); u32 raw; \ } -CORE_DEFINE_HANDLE(Handle); // Untyped handle that can be casted to a strongly typed resource handle +CORE_DEFINE_HANDLE( + Handle); // Untyped handle that can be casted to a strongly typed resource handle -#define PUB // For collecting public APIs to expose in an amalgamation header file +#define PUB // For collecting public APIs to expose in an amalgamation header file -#define KB(x) ((size_t) x * 1000) -#define MB(x) ((size_t) x * 1000 * 1000) -#define GB(x) ((size_t) x * 1000 * 1000 * 1000) +#define KB(x) ((size_t)x * 1000) +#define MB(x) ((size_t)x * 1000 * 1000) +#define GB(x) ((size_t)x * 1000 * 1000 * 1000) // NOTE: The below is now handled in xmake.lua // Platform will inform renderer backend (unless user overrides) |