aboutsummaryrefslogtreecommitdiff
path: root/kernel/proc/kthread.c
diff options
context:
space:
mode:
authorMichael Foiani <mfoiani@cs.brown.edu>2024-02-11 04:05:38 -0500
committerMichael Foiani <mfoiani@cs.brown.edu>2024-02-11 04:05:38 -0500
commitc2cebabba05eff0436faf90bbd691c1e36f7013c (patch)
tree395bd6c7513b028c82b9c4cd5ffc1ebf8e1787ca /kernel/proc/kthread.c
parent65ece110519f88227039921b09dab60ec4d3d982 (diff)
add debug statements and start some testing
Diffstat (limited to 'kernel/proc/kthread.c')
-rw-r--r--kernel/proc/kthread.c4
1 files changed, 4 insertions, 0 deletions
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;
}