mirror of
https://github.com/justinian/jsix.git
synced 2025-12-12 01:14:31 -08:00
[kernel] Run global constructors
Look up the global constructor list that the linker outputs, and run them all. Required creation of the `kutil::no_construct` template for objects that are constructed before the global constructors are run. Also split the `memory_initialize` function into two - one for just those objects that need to happen before the global ctors, and one after. Tags: memory c++
This commit is contained in:
@@ -21,9 +21,9 @@ using kutil::memcpy;
|
||||
logger *logger::s_log = nullptr;
|
||||
const char *logger::s_level_names[] = {"", "debug", "info", "warn", "error", "fatal"};
|
||||
|
||||
logger::logger() :
|
||||
logger::logger(logger::immediate output) :
|
||||
m_buffer(nullptr, 0),
|
||||
m_immediate(nullptr),
|
||||
m_immediate(output),
|
||||
m_sequence(0)
|
||||
{
|
||||
memset(&m_levels, 0, sizeof(m_levels));
|
||||
@@ -31,9 +31,9 @@ logger::logger() :
|
||||
s_log = this;
|
||||
}
|
||||
|
||||
logger::logger(uint8_t *buffer, size_t size) :
|
||||
logger::logger(uint8_t *buffer, size_t size, logger::immediate output) :
|
||||
m_buffer(buffer, size),
|
||||
m_immediate(nullptr),
|
||||
m_immediate(output),
|
||||
m_sequence(0)
|
||||
{
|
||||
memset(&m_levels, 0, sizeof(m_levels));
|
||||
|
||||
Reference in New Issue
Block a user