- events tested and implemented multithreading support through mpscq

This commit is contained in:
2025-12-23 12:24:23 -05:00
parent 1f6637408d
commit 184bc7fcdf
12 changed files with 281 additions and 31 deletions

View File

@@ -31,6 +31,8 @@
#ifndef FENNEC_LANG_ASSERT_H
#define FENNEC_LANG_ASSERT_H
#include <fennec/lang/types.h>
///
/// \page fennec_lang_assert Assertions
///
@@ -69,7 +71,19 @@
#endif
#ifndef FENNEC_DOXYGEN
void _assert_impl(const char* expression, const char* file, int line, const char* function, const char* desc, bool halt);
void _assert_impl(const char* expr, size_t expr_l,
const char* file, size_t file_l, int line,
const char* func, size_t func_l,
const char* desc, bool halt);
template<size_t ExprL, size_t FileL, size_t FuncL>
void _assert(const char (&expr)[ExprL],
const char (&file)[FileL], int line,
const char (&func)[FuncL],
const char* desc,
bool halt) {
::_assert_impl(expr, ExprL, file, FileL, line, func, FuncL, desc, halt);
}
#endif
///
@@ -78,7 +92,7 @@ void _assert_impl(const char* expression, const char* file, int line, const char
/// \param description the description of the assertion
#define assert(expression, description) \
if(not(expression)) [[unlikely]] { \
_assert_impl(#expression, __FILE__, __LINE__, __PRETTY_FUNCTION__, description, not FENNEC_RELEASE); \
_assert(#expression, __FILE__, __LINE__, __PRETTY_FUNCTION__, description, not FENNEC_RELEASE); \
}
///
@@ -87,7 +101,7 @@ void _assert_impl(const char* expression, const char* file, int line, const char
/// \param description the description of the assertion
#define assertf(expression, description) \
if(not(expression)) [[unlikely]] { \
_assert_impl(#expression, __FILE__, __LINE__, __PRETTY_FUNCTION__, description, true); \
_assert(#expression, __FILE__, __LINE__, __PRETTY_FUNCTION__, description, true); \
}
///