refactor: Entire code base, thread and log usage

Boils down to:
- Include headers
- Reduce boiler plate with helpers
- Swap out explicit usages with core API layer
  and ensure the right API is configured beforehand
This commit is contained in:
icex2
2024-08-14 17:53:51 +02:00
parent 82d1a2df52
commit 93e0a090bc
338 changed files with 1307 additions and 641 deletions
+1
View File
@@ -3,6 +3,7 @@ dlls += ddrio-async
ldflags_ddrio-async:= \
libs_ddrio-async := \
core \
util \
src_ddrio-async := \
+6 -3
View File
@@ -11,8 +11,9 @@
#include "bemanitools/ddrio.h"
#include "util/log.h"
#include "util/thread.h"
#include "core/log.h"
#include "core/thread.h"
#include "util/time.h"
typedef void (*ddr_io_set_loggers_t)(
@@ -154,7 +155,7 @@ void ddr_io_set_loggers(
_log_formatter_warning = warning;
_log_formatter_fatal = fatal;
log_to_external(misc, info, warning, fatal);
core_log_impl_set(misc, info, warning, fatal);
}
bool ddr_io_init(
@@ -164,6 +165,8 @@ bool ddr_io_init(
{
log_info("Loading ddrio-async-child.dll as child ddrio library...");
core_thread_impl_set(thread_create, thread_join, thread_destroy);
_child_ddr_io_module = LoadLibraryA("ddrio-async-child.dll");
if (_child_ddr_io_module == NULL) {