Re: How to write a kernel patch to expose a kernel-level function?



>Why? Of what possible use could that information be? What problem are you
>trying to solve?

>A different story is that the result is probably invalid at the time your user code gets it. There
>is no guarantee that the process is running on the reported processor anymore.

I am trying to make sure sched_setaffinity() works. That system call
allows you to restrict the execution of the calling thread on a (set
of) particular logical processor(s). So, after I call
sched_setaffinity(), I want to call smp_processor_id() to see if the
thread is indeed executing on a processor selected.

.



Relevant Pages