Re: [patch] scheduler bits from 2.5.23-dj1

Mikael Pettersson
2002-06-20T10:11:03Z

On Thu, 20 Jun 2002 00:26:39 -0700, Manik Raina wrote:
> A small doubt,
> Should'nt this function below return something ?
> set_task_cpu() should return unsigned int but it
> seems to do nothing ....
>
>
>Ingo Molnar wrote:
>> +
>> +static inline unsigned int set_task_cpu(struct task_struct *p, unsigned int cpu)
>> +{
>> +}

My UP CPU number optimisation patch, from which this originates,
made the set_${foo}_cpu() inline 'void'. If for some reason a
return value is needed, just return 0 since that's what the
optimised-away "->cpu = 0" assignment would have had as value.

(The difference is that I had foo=thread_info, but Ingo lifted it
up so foo=task_struct here. I also removed the x86 thread_info cpu
field on UP.)

/Mikael