sched: initialise kernel_thread parent ptr

This commit is contained in:
2023-04-09 16:38:08 +01:00
parent da415c7f6d
commit 80f5e0483c
2 changed files with 7 additions and 1 deletions

View File

@@ -32,6 +32,10 @@ void thread_free(thread_t *thr)
thread_t *current_thread(void)
{
cpu_data_t *cpu = get_this_cpu();
if (!cpu) {
return NULL;
}
thread_t *out = cpu->c_current_thread;
put_cpu(cpu);
return out;