Skip to contentSkip to conversation

schedule() does not work...

DISCUSSION benzi vizman 1 participant 1 message May 4, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

I try to run the following code in kernel (which is similar to apm() function) but it does not seem to work...

if (smp_processor_id() != cpu) {
      current->cpus_allowed = (1UL << cpu);
      schedule();
      if (smp_processor_id() != cpu) {
          BUG();
      }
}

Any idea why?

Benzi.