Skip to content

Commit

Permalink
sched: uninline set_task_cpu()
Browse files Browse the repository at this point in the history
uninline set_task_cpu(): CFS will add more code to it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Jul 9, 2007
1 parent 0437e10 commit c65cc87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1633,10 +1633,7 @@ static inline unsigned int task_cpu(const struct task_struct *p)
return task_thread_info(p)->cpu;
}

static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
{
task_thread_info(p)->cpu = cpu;
}
extern void set_task_cpu(struct task_struct *p, unsigned int cpu);

#else

Expand Down
6 changes: 6 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,12 @@ unsigned long weighted_cpuload(const int cpu)
}

#ifdef CONFIG_SMP

void set_task_cpu(struct task_struct *p, unsigned int cpu)
{
task_thread_info(p)->cpu = cpu;
}

struct migration_req {
struct list_head list;

Expand Down

0 comments on commit c65cc87

Please sign in to comment.