Files

19 lines
425 B
C

#include <kernel/printk.h>
#include <kernel/sched.h>
#include <kernel/task.h>
#include <kernel/thread.h>
kern_status_t sys_kern_log(const char *s)
{
#ifdef TRACE
struct task *task = get_current_task();
struct thread *thread = get_current_thread();
printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s);
put_current_thread(thread);
put_current_task(task);
#else
printk("%s", s);
#endif
return KERN_OK;
}