diff --git a/init/main.c b/init/main.c index 2330dfb..0b1a904 100644 --- a/init/main.c +++ b/init/main.c @@ -15,10 +15,6 @@ #include #include -#ifdef KEXT_NET_DOORSTUCK_SOCKS_FBCON -#include -#endif - extern unsigned long get_rflags(void); extern char __pstart[], __pend[]; @@ -30,19 +26,30 @@ void print_kernel_banner(void) static void hang(void) { + struct task *self = current_task(); + struct thread *thread = current_thread(); + while (1) { - printk("%d: tick", this_cpu()); + printk("[cpu %u, task %u, thread %u]: tick", + this_cpu(), + self->t_id, + thread->tr_id); milli_sleep(2000); } } void background_thread(void) { + struct task *self = current_task(); + struct thread *thread = current_thread(); printk("background_thread() running on processor %u", this_cpu()); milli_sleep(1000); while (1) { - printk("%d: tock", this_cpu()); + printk("[cpu %u, task %u, thread %u]: tock", + this_cpu(), + self->t_id, + thread->tr_id); milli_sleep(2000); } }