I am writing a kernel module which tries to get the current task for a given cpu, for example,
for_each_possible_cpu(cpu)
{
p = curr_task(cpu);
printk("current task on cpu %d is %d\n", cpu, p->pid);
}
In our kernel module we could only used exported function symbols, or we could hard code the kernel func address from system map in our module then use it.
Now I only found curr_task function for IA64, what is the way to get the current task on given cpu for X86_32? Thank you.