diff --git a/headers/private/kernel/thread_types.h b/headers/private/kernel/thread_types.h index 0a4d0a2ee1..20194512f6 100644 --- a/headers/private/kernel/thread_types.h +++ b/headers/private/kernel/thread_types.h @@ -158,9 +158,7 @@ struct free_user_thread { struct user_thread* thread; }; -struct scheduler_thread_data { - // empty, left up to the individual schedulers to subclass / define -}; +struct scheduler_thread_data; struct team { struct team *next; // next in hash diff --git a/src/system/kernel/scheduler/scheduler_affine.cpp b/src/system/kernel/scheduler/scheduler_affine.cpp index ddb3e971c5..4b917dd43d 100644 --- a/src/system/kernel/scheduler/scheduler_affine.cpp +++ b/src/system/kernel/scheduler/scheduler_affine.cpp @@ -40,8 +40,8 @@ static struct thread* sRunQueue[B_MAX_CPU_COUNT]; static struct thread* sIdleThreads; static cpu_mask_t sIdleCPUs = 0; -struct affine_scheduler_data : scheduler_thread_data { - affine_scheduler_data(void) +struct scheduler_thread_data { + scheduler_thread_data(void) { init(); } @@ -460,7 +460,7 @@ affine_reschedule(void) static void affine_on_thread_create(struct thread* thread) { - thread->scheduler_data = new(std::nothrow) affine_scheduler_data(); + thread->scheduler_data = new(std::nothrow) scheduler_thread_data(); if (thread->scheduler_data == NULL) panic("affine_scheduler: Unable to allocate scheduling data structure for thread %ld\n", thread->id); } @@ -469,7 +469,7 @@ affine_on_thread_create(struct thread* thread) static void affine_on_thread_init(struct thread* thread) { - ((affine_scheduler_data *)(thread->scheduler_data))->init(); + ((scheduler_thread_data *)(thread->scheduler_data))->init(); }