kernel: re-implement sending handles via port messages
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define MANGO_LOG_H_
|
||||
|
||||
#include <mango/status.h>
|
||||
#include <mango/types.h>
|
||||
|
||||
#undef TRACE
|
||||
|
||||
@@ -9,18 +10,18 @@ extern kern_status_t kern_log(const char *s);
|
||||
|
||||
#define kern_logf(...) \
|
||||
do { \
|
||||
char s[128]; \
|
||||
snprintf(s, sizeof s, __VA_ARGS__); \
|
||||
kern_log(s); \
|
||||
char __logbuf[128]; \
|
||||
snprintf(__logbuf, sizeof __logbuf, __VA_ARGS__); \
|
||||
kern_log(__logbuf); \
|
||||
} while (0)
|
||||
|
||||
#ifdef TRACE
|
||||
#define kern_trace(...) kern_log(__VA_ARGS__)
|
||||
#define kern_tracef(...) \
|
||||
do { \
|
||||
char s[128]; \
|
||||
snprintf(s, sizeof s, __VA_ARGS__); \
|
||||
kern_log(s); \
|
||||
char __logbuf[128]; \
|
||||
snprintf(__logbuf, sizeof __logbuf, __VA_ARGS__); \
|
||||
kern_log(__logbuf); \
|
||||
} while (0)
|
||||
#else
|
||||
#define kern_trace(...)
|
||||
|
||||
Reference in New Issue
Block a user