Replace printf logging with spdlog equivalent

Preserve previous printfs in comments for now. Spdlog needs to be configured to be thread-safe. Few additional printfs to convert later. No changes have been made to GOAL's internal printing system
This commit is contained in:
Shay
2020-10-01 16:08:23 -06:00
parent 4d208b0729
commit e2ea57ea58
13 changed files with 131 additions and 60 deletions
+9 -5
View File
@@ -16,6 +16,7 @@
#include "game/common/ramdisk_rpc_types.h"
#include "game/common/loader_rpc_types.h"
#include "game/common/play_rpc_types.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
using namespace ee;
@@ -175,9 +176,10 @@ void BeginLoadingDGO(const char* name, Ptr<u8> buffer1, Ptr<u8> buffer2, Ptr<u8>
// file name
strcpy(sMsg[msgID].name, name);
printf("[Begin Loading DGO RPC] %s, 0x%x, 0x%x, 0x%x\n", name, buffer1.offset, buffer2.offset,
currentHeap.offset);
//printf("[Begin Loading DGO RPC] %s, 0x%x, 0x%x, 0x%x\n", name, buffer1.offset, buffer2.offset,
// currentHeap.offset);
spdlog::info("[Begin Loading DGO RPC] {}, 0x{}, 0x{}, 0x{}", name, buffer1.offset, buffer2.offset,
currentHeap.offset);
// this RPC will return once we have loaded the first object file.
// but we call async, so we don't block here.
RpcCall(DGO_RPC_CHANNEL, DGO_RPC_LOAD_FNO, true, mess, sizeof(RPC_Dgo_Cmd), mess,
@@ -299,7 +301,8 @@ void load_and_link_dgo(u64 name_gstr, u64 heap_info, u64 flag, u64 buffer_size)
* This does not use the mutli-threaded linker and will block until the entire file is done.e
*/
void load_and_link_dgo_from_c(const char* name, Ptr<kheapinfo> heap, u32 linkFlag, s32 bufferSize) {
printf("[Load and Link DGO From C] %s\n", name);
//printf("[Load and Link DGO From C] %s\n", name);
spdlog::info("[Load and Link DGO From C] {}", name);
u32 oldShowStall = sShowStallMsg;
// remember where the heap top point is so we can clear temporary allocations
@@ -348,7 +351,8 @@ void load_and_link_dgo_from_c(const char* name, Ptr<kheapinfo> heap, u32 linkFla
char objName[64];
strcpy(objName, (dgoObj + 4).cast<char>().c()); // name from dgo object header
printf("[link and exec] %s %d\n", objName, lastObjectLoaded);
//printf("[link and exec] %s %d\n", objName, lastObjectLoaded);
spdlog::info("[link and exec] {} {}", objName, lastObjectLoaded);
link_and_exec(obj, objName, objSize, heap, linkFlag); // link now!
// inform IOP we are done
+42 -21
View File
@@ -25,6 +25,7 @@
#include "game/sce/libcdvd_ee.h"
#include "game/sce/stubs.h"
#include "common/symbols.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
using namespace ee;
/*!
@@ -147,13 +148,16 @@ void InitParms(int argc, const char* const* argv) {
* DONE, EXACT
*/
void InitCD() {
printf("Initializing CD drive\nThis may take a while ...\n");
//printf("Initializing CD drive\nThis may take a while ...\n");
spdlog::debug("Initializing CD drive\nThis may take a while...\n");
sceCdInit(SCECdINIT);
sceCdMmode(SCECdDVD);
while (sceCdDiskReady(0) == SCECdNotReady) {
printf("Drive not ready ... insert a disk!\n");
//printf("Drive not ready ... insert a disk!\n");
spdlog::debug("Drive not ready... insert a disk!\n");
}
printf("Disk type %d\n", sceCdGetDiskType());
// printf("Disk type %d\n", sceCdGetDiskType());
spdlog::debug("Disk type {}\n", sceCdGetDiskType());
}
/*!
@@ -171,22 +175,28 @@ void InitIOP() {
if (!reboot) {
// reboot with development IOP kernel
printf("Rebooting IOP...\n");
//printf("Rebooting IOP...\n");
spdlog::debug("Rebooting IOP...");
while (!sceSifRebootIop("host0:/usr/local/sce/iop/modules/ioprp221.img")) {
printf("Failed, retrying...\n");
//printf("Failed, retrying...\n");
spdlog::debug("Failed, retrying");
}
while (!sceSifSyncIop()) {
printf("Syncing...\n");
//printf("Syncing...\n");
spdlog::debug("Syncing...");
}
} else {
// reboot with IOP kernel off of the disk
// reboot with development IOP kernel
printf("Rebooting IOP...\n");
//printf("Rebooting IOP...\n");
spdlog::debug("Rebooting IOP...");
while (!sceSifRebootIop("cdrom0:\\DRIVERS\\IOPRP221.IMG;1")) {
printf("Failed, retrying...\n");
//printf("Failed, retrying...\n");
spdlog::debug("Failed, retrying");
}
while (!sceSifSyncIop()) {
printf("Syncing...\n");
//printf("Syncing...\n");
spdlog::debug("Syncing...");
}
}
@@ -237,7 +247,8 @@ void InitIOP() {
sceSifLoadModule("host0:/usr/home/src/989snd10/iop/989ERR.IRX", 0, nullptr);
printf("Initializing CD library\n");
//printf("Initializing CD library\n");
spdlog::debug("Initializing CD library...");
auto rv = sceSifLoadModule("host0:binee/overlord.irx", cmd + len + 1 - overlord_boot_command,
overlord_boot_command);
if (rv < 0) {
@@ -269,7 +280,8 @@ void InitIOP() {
MsgErr("loading 989snd.irx failed\n");
}
printf("Initializing CD library in ISO_CD mode\n");
//printf("Initializing CD library in ISO_CD mode\n");
spdlog::debug("Initializing CD library in ISO_CD mode...");
auto rv = sceSifLoadModule("cdrom0:\\\\DRIVERS\\\\OVERLORD.IRX;1",
cmd + len + 1 - overlord_boot_command, overlord_boot_command);
if (rv < 0) {
@@ -280,7 +292,8 @@ void InitIOP() {
if (rv < 0) {
MsgErr("MC driver init failed %d\n", rv);
} else {
printf("InitIOP OK\n");
//printf("InitIOP OK\n");
spdlog::debug("InitIOP OK");
}
}
@@ -301,8 +314,10 @@ int InitMachine() {
// initialize the global heap
u32 global_heap_size = GLOBAL_HEAP_END - HEAP_START;
float size_mb = ((float)global_heap_size) / (float)(1 << 20);
printf("gkernel: global heap - 0x%x to 0x%x (size %.3f MB)\n", HEAP_START, GLOBAL_HEAP_END,
size_mb);
//printf("gkernel: global heap - 0x%x to 0x%x (size %.3f MB)\n", HEAP_START, GLOBAL_HEAP_END,
// size_mb);
spdlog::info("gkernel: global heap 0x{} to 0x{} (size {} MB)", HEAP_START, GLOBAL_HEAP_END,
size_mb);
kinitheap(kglobalheap, Ptr<u8>(HEAP_START), global_heap_size);
// initialize the debug heap, if appropriate
@@ -311,8 +326,10 @@ int InitMachine() {
kinitheap(kdebugheap, Ptr<u8>(DEBUG_HEAP_START), debug_heap_size);
float debug_size_mb = ((float)debug_heap_size) / (float)(1 << 20);
float gap_size_mb = ((float)DEBUG_HEAP_START - GLOBAL_HEAP_END) / (float)(1 << 20);
printf("gkernel: debug heap - 0x%x to 0x%x (size %.3f MB, gap %.3f MB)\n", DEBUG_HEAP_START,
debug_heap_end, debug_size_mb, gap_size_mb);
//printf("gkernel: debug heap - 0x%x to 0x%x (size %.3f MB, gap %.3f MB)\n", DEBUG_HEAP_START,
//debug_heap_end, debug_size_mb, gap_size_mb);
spdlog::info("gkernel: global heap 0x{} to 0x{} (size {} MB, gap {} MB)", DEBUG_HEAP_START,
debug_heap_end, debug_size_mb, gap_size_mb);
} else {
// if no debug, we make the kheapinfo structure NULL so GOAL knows not to use it.
kdebugheap.offset = 0;
@@ -337,9 +354,11 @@ int InitMachine() {
InitGoalProto();
}
printf("InitSound\n");
//printf("InitSound\n");
spdlog::info("InitSound");
InitSound(); // do nothing!
printf("InitRPC\n");
//printf("InitRPC\n");
spdlog::info("InitRPC");
InitRPC(); // connect to IOP
reset_output(); // reset output buffers
clear_print();
@@ -349,9 +368,11 @@ int InitMachine() {
return goal_status;
}
printf("InitListenerConnect\n");
spdlog::info("InitListenerConnect");
//printf("InitListenerConnect\n");
InitListenerConnect();
printf("InitCheckListener\n");
spdlog::info("InitCheckListener");
//printf("InitCheckListener\n");
InitCheckListener();
Msg(6, "kernel: machine started\n");
return 0;
@@ -618,7 +639,7 @@ void InitMachineScheme() {
new_pair(s7.offset + FIX_SYM_GLOBAL_HEAP, *((s7 + FIX_SYM_PAIR_TYPE).cast<u32>()),
make_string_from_c("common"), kernel_packages->value);
printf("calling play!\n");
spdlog::info("calling fake play~");
call_goal_function_by_name("play");
}
}
+5 -2
View File
@@ -19,6 +19,7 @@
#include "common/symbols.h"
#include "common/versions.h"
#include "common/goal_constants.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
//! Controls link mode when EnableMethodSet = 0, MasterDebug = 1, DiskBoot = 0. Will enable a
//! warning message if EnableMethodSet = 1
@@ -1895,8 +1896,10 @@ s32 InitHeapAndSymbol() {
(kernel_version >> 3) & 0xffff);
return -1;
} else {
printf("Got correct kernel version %d.%d\n", kernel_version >> 0x13,
(kernel_version >> 3) & 0xffff);
spdlog::info("Got correct kernel version {}.{}", kernel_version >> 0x13,
(kernel_version >> 3) & 0xffff);
//printf("Got correct kernel version %d.%d\n", kernel_version >> 0x13,
// (kernel_version >> 3) & 0xffff);
}
}
+9 -4
View File
@@ -8,13 +8,18 @@
#include "third-party/spdlog/include/spdlog/spdlog.h"
#include "third-party/spdlog/include/spdlog/sinks/basic_file_sink.h"
int main(int argc, char** argv) {
while (true) {
// run the runtime in a loop so we can reset the game and have it restart cleanly
printf("gk %d.%d\n", versions::GOAL_VERSION_MAJOR, versions::GOAL_VERSION_MINOR);
spdlog::set_level(spdlog::level::debug);
spdlog::info("spdlog initialized");
spdlog::error("test error", 1);
spdlog::debug("This is a debug-only message");
// run the runtime in a loop so we can reset the game and have it restart cleanly
//printf("gk %d.%d\n", versions::GOAL_VERSION_MAJOR, versions::GOAL_VERSION_MINOR);
spdlog::debug("gk {}.{} OK!\n", versions::GOAL_VERSION_MAJOR, versions::GOAL_VERSION_MINOR);
if (exec_runtime(argc, argv) == 2) {
return 0;
}
+13 -6
View File
@@ -16,6 +16,7 @@
#include "isocommon.h"
#include "overlord.h"
#include "common/util/FileUtil.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
using namespace iop;
@@ -215,7 +216,8 @@ uint32_t FS_GetLength(FileRecord* fr) {
* This is an ISO FS API Function
*/
LoadStackEntry* FS_Open(FileRecord* fr, int32_t offset) {
printf("[OVERLORD] FS Open %s\n", fr->name); // Added
//printf("[OVERLORD] FS Open %s\n", fr->name); // Added
spdlog::info("[OVERLORD] FS Open {}", fr->name);
LoadStackEntry* selected = nullptr;
// find first unused spot on load stack.
for (uint32_t i = 0; i < MAX_OPEN_FILES; i++) {
@@ -229,7 +231,8 @@ LoadStackEntry* FS_Open(FileRecord* fr, int32_t offset) {
return selected;
}
}
printf("[OVERLORD ISO CD] Failed to FS_Open %s\n", fr->name);
//printf("[OVERLORD ISO CD] Failed to FS_Open %s\n", fr->name);
spdlog::warn("[OVERLORD] Failed to FS Open {}", fr->name);
ExitIOP();
return nullptr;
}
@@ -240,7 +243,8 @@ LoadStackEntry* FS_Open(FileRecord* fr, int32_t offset) {
* This is an ISO FS API Function
*/
LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) {
printf("[OVERLORD] FS Open %s\n", fr->name); // Added
//printf("[OVERLORD] FS Open %s\n", fr->name); // Added
spdlog::info("[OVERLORD] FS_OpenWad {}", fr->name);
LoadStackEntry* selected = nullptr;
for (uint32_t i = 0; i < MAX_OPEN_FILES; i++) {
if (!sLoadStack[i].fr) {
@@ -250,7 +254,8 @@ LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) {
return selected;
}
}
printf("[OVERLORD ISO CD] Failed to FS_OpenWad %s\n", fr->name);
//printf("[OVERLORD ISO CD] Failed to FS_OpenWad %s\n", fr->name);
spdlog::warn("[OVERLORD] Failed to FS_OpenWad {}", fr->name);
ExitIOP();
return nullptr;
}
@@ -260,7 +265,8 @@ LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) {
* This is an ISO FS API Function
*/
void FS_Close(LoadStackEntry* fd) {
printf("[OVERLORD] FS Close %s\n", fd->fr->name);
//printf("[OVERLORD] FS Close %s\n", fd->fr->name);
spdlog::info("[OVERLORD] FS_Close {}", fd->fr->name);
// close the FD
fd->fr = nullptr;
@@ -279,7 +285,8 @@ uint32_t FS_BeginRead(LoadStackEntry* fd, void* buffer, int32_t len) {
int32_t real_size = len;
if (len < 0) {
// not sure what this is about...
printf("[OVERLORD ISO CD] negative length warning!\n");
//printf("[OVERLORD ISO CD] negative length warning!\n");
spdlog::warn("[OVERLORD ISO CD] Negative length warning!");
real_size = len + 0x7ff;
}
+7 -3
View File
@@ -4,6 +4,7 @@
* This is a huge mess
*/
#include "third-party/spdlog/include/spdlog/spdlog.h"
#include <assert.h>
#include <cstring>
#include <cstdio>
@@ -17,6 +18,7 @@
#include "fake_iso.h"
#include "game/common/dgo_rpc_types.h"
using namespace iop;
u32 ISOThread();
@@ -492,9 +494,11 @@ u32 RunDGOStateMachine(IsoMessage* _cmd, IsoBufferHeader* buffer) {
// if we are done with header
if (cmd->bytes_processed == sizeof(DgoHeader)) {
printf("[Overlord DGO] Got DGO file header for %s with %d objects\n",
cmd->dgo_header.name,
cmd->dgo_header.object_count); // added
//printf("[Overlord DGO] Got DGO file header for %s with %d objects\n",
//cmd->dgo_header.name,
//cmd->dgo_header.object_count); // added
spdlog::info("[Overlord DGO] Got DGO file header for {} with {} objects",
cmd->dgo_header.name, cmd->dgo_header.object_count);
cmd->bytes_processed = 0;
cmd->objects_loaded = 0;
if (cmd->dgo_header.object_count == 1) {
+5 -2
View File
@@ -1,5 +1,6 @@
#include "iso_api.h"
#include "game/sce/iop.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
using namespace iop;
@@ -7,7 +8,8 @@ using namespace iop;
* Load a File to IOP memory (blocking)
*/
void LoadISOFileToIOP(FileRecord* file, void* addr, uint32_t length) {
printf("[OVERLORD] LoadISOFileToIOP %s, %d/%d bytes\n", file->name, length, file->size);
//printf("[OVERLORD] LoadISOFileToIOP %s, %d/%d bytes\n", file->name, length, file->size);
spdlog::info("[OVERLORD] LoadISOFileToIOP {}, {}/{} bytes", file->name, length, file->size);
IsoCommandLoadSingle cmd;
cmd.cmd_id = LOAD_TO_IOP_CMD_ID;
cmd.messagebox_to_reply = 0;
@@ -27,7 +29,8 @@ void LoadISOFileToIOP(FileRecord* file, void* addr, uint32_t length) {
* Load a File to IOP memory (blocking)
*/
void LoadISOFileToEE(FileRecord* file, uint32_t addr, uint32_t length) {
printf("[OVERLORD] LoadISOFileToEE %s, %d/%d bytes\n", file->name, length, file->size);
//printf("[OVERLORD] LoadISOFileToEE %s, %d/%d bytes\n", file->name, length, file->size);
spdlog::info("[OVERLORD] LoadISOFileToEE {}, {}/{} bytes", file->name, length, file->size);
IsoCommandLoadSingle cmd;
cmd.cmd_id = LOAD_TO_EE_CMD_ID;
cmd.messagebox_to_reply = 0;
+23 -10
View File
@@ -68,7 +68,8 @@ void deci2_runner(SystemThreadInterface& iface) {
iface.initialization_complete();
// in our own thread, wait for the EE to register the first protocol driver
printf("[DECI2] waiting for EE to register protos\n");
//printf("[DECI2] waiting for EE to register protos\n");
spdlog::debug("[DECI2] Waiting for EE to register protos");
server.wait_for_protos_ready();
// then allow the server to accept connections
if (!server.init()) {
@@ -76,11 +77,13 @@ void deci2_runner(SystemThreadInterface& iface) {
}
printf("[DECI2] waiting for listener...\n");
//spdlog::debug("[DECI2] Waiting for listener..."); --> disabled temporarily, some weird race condition?
bool saw_listener = false;
while (!iface.get_want_exit()) {
if (server.check_for_listener()) {
if (!saw_listener) {
printf("[DECI2] Connected!\n");
spdlog::debug("[DECI2] Connected!");
}
saw_listener = true;
// we have a listener, run!
@@ -117,19 +120,23 @@ void ee_runner(SystemThreadInterface& iface) {
}
if (g_ee_main_mem == (u8*)(-1)) {
printf(" Failed to initialize main memory! %s\n", strerror(errno));
//printf(" Failed to initialize main memory! %s\n", strerror(errno));
spdlog::debug("Failed to initialize main memory! {}", strerror(errno));
iface.initialization_complete();
return;
}
printf(" Main memory mapped at 0x%016llx\n", (u64)(g_ee_main_mem));
//spdlog::debug("Main memory mapped at 0x00000") --- todo: printf conversion specification
printf(" Main memory size 0x%x bytes (%.3f MB)\n", EE_MAIN_MEM_SIZE,
(double)EE_MAIN_MEM_SIZE / (1 << 20));
printf("[EE] Initialization complete!\n");
//printf("[EE] Initialization complete!\n");
spdlog::debug("[EE] Initialization complete!");
iface.initialization_complete();
printf("[EE] Run!\n");
//printf("[EE] Run!\n");
spdlog::debug("[EE] Run!");
memset((void*)g_ee_main_mem, 0, EE_MAIN_MEM_SIZE);
// prevent access to the first 1 MB of memory.
@@ -151,7 +158,8 @@ void ee_runner(SystemThreadInterface& iface) {
kprint_init_globals();
goal_main(g_argc, g_argv);
printf("[EE] Done!\n");
//printf("[EE] Done!\n");
spdlog::debug("[EE] Done!");
// // kill the IOP todo
iop::LIBRARY_kill();
@@ -167,7 +175,8 @@ void ee_runner(SystemThreadInterface& iface) {
*/
void iop_runner(SystemThreadInterface& iface) {
IOP iop;
printf("[IOP] Restart!\n");
//printf("[IOP] Restart!\n");
spdlog::debug("[IOP] Restart!");
iop.reset_allocator();
ee::LIBRARY_sceSif_register(&iop);
iop::LIBRARY_register(&iop);
@@ -190,12 +199,15 @@ void iop_runner(SystemThreadInterface& iface) {
iface.initialization_complete();
printf("[IOP] Wait for OVERLORD to be started...\n");
//printf("[IOP] Wait for OVERLORD to be started...\n");
spdlog::debug("[IOP] Wait for OVERLORD to start...");
iop.wait_for_overlord_start_cmd();
if (iop.status == IOP_OVERLORD_INIT) {
printf("[IOP] Run!\n");
//printf("[IOP] Run!\n");
spdlog::debug("[IOP] Run!");
} else {
printf("[IOP] shutdown!\n");
//printf("[IOP] shutdown!\n");
spdlog::debug("[IOP] Shutdown!");
return;
}
@@ -257,6 +269,7 @@ u32 exec_runtime(int argc, char** argv) {
// join and exit
tm.join();
printf("GOAL Runtime Shutdown (code %d)\n", MasterExit);
//printf("GOAL Runtime Shutdown (code %d)\n", MasterExit);
spdlog::info("GOAL Runtime Shutdown (code {})", MasterExit);
return MasterExit;
}
+2 -1
View File
@@ -69,7 +69,8 @@ s32 sceDeci2Open(u16 protocol, void* opt, void (*handler)(s32 event, s32 param,
drv.id = protocol_count + 1;
drv.active = true;
protocols[protocol_count++] = drv;
printf("[DECI2] Add new protocol driver %d for 0x%x\n", drv.id, drv.protocol);
//printf("[DECI2] Add new protocol driver %d for 0x%x\n", drv.id, drv.protocol);
spdlog::info("[DECI2] Add new protocol driver {} for 0x{}", drv.id, drv.protocol);
server->unlock();
if (protocol_count == 1) {
+1
View File
@@ -4,6 +4,7 @@
#define JAK1_IOP_H
#include "common/common_types.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
#define SMEM_Low (0)
#define SMEM_High (1)
+1
View File
@@ -19,6 +19,7 @@
#include <condition_variable>
#include <functional>
#include "game/system/deci_common.h"
#include "third-party/spdlog/include/spdlog/spdlog.h"
class Deci2Server {
public:
+13 -6
View File
@@ -13,7 +13,8 @@
*/
SystemThread& SystemThreadManager::create_thread(const std::string& name) {
if (thread_count >= MAX_SYSTEM_THREADS) {
throw std::runtime_error("Out of System Threads! Please increase MAX_SYSTEM_THREADS");
spdlog::critical("Out of System Threads! MAX_SYSTEM_THREADS is ", MAX_SYSTEM_THREADS);
throw std::runtime_error("Out of System Threads! Please increase MAX_SYSTEM_THREADS");
}
auto& thread = threads[thread_count];
@@ -49,7 +50,8 @@ void SystemThreadManager::print_stats() {
*/
void SystemThreadManager::shutdown() {
for (int i = 0; i < thread_count; i++) {
printf("# Stop %s\n", threads[i].name.c_str());
//printf("# Stop %s\n", threads[i].name.c_str());
spdlog::debug("# Stop {}", threads[i].name.c_str());
threads[i].stop();
}
}
@@ -59,7 +61,8 @@ void SystemThreadManager::shutdown() {
*/
void SystemThreadManager::join() {
for (int i = 0; i < thread_count; i++) {
printf("# Join %s\n", threads[i].name.c_str());
//printf("# Join %s\n", threads[i].name.c_str());
spdlog::debug(" # Join {}", threads[i].name.c_str());
if (threads[i].running) {
threads[i].join();
}
@@ -73,7 +76,8 @@ void* bootstrap_thread_func(void* x) {
SystemThread* thd = (SystemThread*)x;
SystemThreadInterface iface(thd);
thd->function(iface);
printf("[SYSTEM] Thread %s is returning\n", thd->name.c_str());
//printf("[SYSTEM] Thread %s is returning\n", thd->name.c_str());
spdlog::debug("[SYSTEM] Thread {} is returning", thd->name.c_str());
return nullptr;
}
@@ -81,7 +85,9 @@ void* bootstrap_thread_func(void* x) {
* Start a thread and wait for its initialization
*/
void SystemThread::start(std::function<void(SystemThreadInterface&)> f) {
printf("# Initialize %s...\n", name.c_str());
//printf("# Initialize %s...\n", name.c_str());
spdlog::debug("# Initialize {}...", name.c_str());
function = f;
thread = std::thread(bootstrap_thread_func, this);
running = true;
@@ -118,7 +124,8 @@ void SystemThreadInterface::initialization_complete() {
std::unique_lock<std::mutex> mlk(thread.initialization_mutex);
thread.initialization_complete = true;
thread.initialization_cv.notify_all();
printf("# %s initialized\n", thread.name.c_str());
//printf("# %s initialized\n", thread.name.c_str());
spdlog::debug("# {} initialized", thread.name.c_str());
}
/*!
+1
View File
@@ -14,6 +14,7 @@
#include <mutex>
#include <thread>
#include <condition_variable>
#include "third-party/spdlog/include/spdlog/spdlog.h"
#include "Timer.h"