sched: initialise kernel_thread parent ptr
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user