From c2cebabba05eff0436faf90bbd691c1e36f7013c Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Sun, 11 Feb 2024 04:05:38 -0500 Subject: add debug statements and start some testing --- kernel/proc/kthread.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kernel/proc/kthread.c') diff --git a/kernel/proc/kthread.c b/kernel/proc/kthread.c index 5f707c3..42beb77 100644 --- a/kernel/proc/kthread.c +++ b/kernel/proc/kthread.c @@ -69,6 +69,8 @@ kthread_t *kthread_create(proc_t *proc, kthread_func_t func, long arg1, void *arg2) { // NOT_YET_IMPLEMENTED("PROCS: kthread_create"); + dbg(DBG_THR, "ATTEMPT to create a new thread with proc name=%s, id=%d\n", proc->p_name, proc->p_pid); + kthread_t *new_thread = slab_obj_alloc(kthread_allocator); if (new_thread == NULL) { @@ -97,6 +99,8 @@ kthread_t *kthread_create(proc_t *proc, kthread_func_t func, long arg1, list_init(&new_thread->kt_mutexes); new_thread->kt_recent_core = 0; + dbg(DBG_THR, "SUCCESFULLY created a new thread with proc name=%s, id=%d\n", proc->p_name, proc->p_pid); + return new_thread; } -- cgit v1.2.3-70-g09d2