user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
#include <bits/ensure.h>
|
||||
#include <mlibc/debug.hpp>
|
||||
#include <mlibc/internal-sysdeps.hpp>
|
||||
|
||||
namespace mlibc {
|
||||
|
||||
frg::stack_buffer_logger<InfoSink, 512> infoLogger;
|
||||
frg::stack_buffer_logger<PanicSink, 512> panicLogger;
|
||||
|
||||
void InfoSink::operator() (const char *message) {
|
||||
sys_libc_log(message);
|
||||
}
|
||||
|
||||
void PanicSink::operator() (const char *message) {
|
||||
// sys_libc_log("mlibc: Write to PanicSink");
|
||||
sys_libc_log(message);
|
||||
sys_libc_panic();
|
||||
}
|
||||
|
||||
} // namespace mlibc
|
||||
|
||||
Reference in New Issue
Block a user