/trunk/kernel/generic/src/console/console.c |
49,6 → 49,7 |
#include <atomic.h> |
|
#define KLOG_SIZE PAGE_SIZE |
#define KLOG_LATENCY 8 |
|
/**< Kernel log cyclic buffer */ |
static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE))); |
275,9 → 276,17 |
if (klog_uspace < klog_len) |
klog_uspace++; |
|
/* Check notify uspace to update */ |
bool update; |
if ((klog_uspace > KLOG_LATENCY) || (c == '\n')) |
update = true; |
else |
update = false; |
|
spinlock_unlock(&klog_lock); |
|
klog_update(); |
if (update) |
klog_update(); |
} |
|
/** @} |
/trunk/kernel/generic/src/syscall/syscall.c |
57,7 → 57,7 |
* Print to kernel log. |
* |
*/ |
static unative_t sys_io(int fd, const void * buf, size_t count) |
static unative_t sys_klog(int fd, const void * buf, size_t count) |
{ |
size_t i; |
char *data; |
114,7 → 114,7 |
} |
|
syshandler_t syscall_table[SYSCALL_END] = { |
(syshandler_t) sys_io, |
(syshandler_t) sys_klog, |
(syshandler_t) sys_tls_set, |
|
/* Thread and task related syscalls. */ |