1

I have been studying thread context switch functionality of Linux kernel on x86. I can see that there is a kernel function "cpu_idle" to move a cpu into an idle state. However, I am unable to find the kernel function that is called to wake-up an idle CPU. Please let me know where I can find the function.

samarasa
  • 2,025
  • 2
  • 16
  • 22

1 Answers1

3

There isn't a function to wake the CPU. In the idle state, the CPU is waiting for a system-level interrupt. Usually from a driver after a hardware event or from a previously scheduled timer like a cron job.

This answer has more details: https://stackoverflow.com/a/15096339/50177

Community
  • 1
  • 1
Matt McCormick
  • 678
  • 1
  • 9
  • 22