mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 00:44:31 -08:00
The debugcon logger is now separate from logger::output, and is instead a kernel-internal thread that watches for logs and prints them to the deubcon device.
31 lines
528 B
C++
31 lines
528 B
C++
#pragma once
|
|
/// \file debugcon.h
|
|
/// Kernel debugcon log output process
|
|
|
|
#include "scheduler.h"
|
|
|
|
namespace debugcon {
|
|
|
|
static constexpr bool enable =
|
|
#ifdef __jsix_config_debug
|
|
true;
|
|
#else
|
|
false;
|
|
#endif
|
|
|
|
static constexpr uint16_t port = 0x6600;
|
|
|
|
void logger_task();
|
|
|
|
inline void
|
|
init_logger()
|
|
{
|
|
if constexpr (enable) {
|
|
static constexpr uint8_t pri = scheduler::max_priority - 1;
|
|
scheduler &s = scheduler::get();
|
|
s.create_kernel_task(logger_task, pri, true);
|
|
}
|
|
}
|
|
|
|
} // namespace debugcon
|