Small cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29784 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -158,9 +158,7 @@ struct free_user_thread {
|
|||||||
struct user_thread* thread;
|
struct user_thread* thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scheduler_thread_data {
|
struct scheduler_thread_data;
|
||||||
// empty, left up to the individual schedulers to subclass / define
|
|
||||||
};
|
|
||||||
|
|
||||||
struct team {
|
struct team {
|
||||||
struct team *next; // next in hash
|
struct team *next; // next in hash
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ static struct thread* sRunQueue[B_MAX_CPU_COUNT];
|
|||||||
static struct thread* sIdleThreads;
|
static struct thread* sIdleThreads;
|
||||||
static cpu_mask_t sIdleCPUs = 0;
|
static cpu_mask_t sIdleCPUs = 0;
|
||||||
|
|
||||||
struct affine_scheduler_data : scheduler_thread_data {
|
struct scheduler_thread_data {
|
||||||
affine_scheduler_data(void)
|
scheduler_thread_data(void)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
@@ -460,7 +460,7 @@ affine_reschedule(void)
|
|||||||
static void
|
static void
|
||||||
affine_on_thread_create(struct thread* thread)
|
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)
|
if (thread->scheduler_data == NULL)
|
||||||
panic("affine_scheduler: Unable to allocate scheduling data structure for thread %ld\n", thread->id);
|
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
|
static void
|
||||||
affine_on_thread_init(struct thread* thread)
|
affine_on_thread_init(struct thread* thread)
|
||||||
{
|
{
|
||||||
((affine_scheduler_data *)(thread->scheduler_data))->init();
|
((scheduler_thread_data *)(thread->scheduler_data))->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user