Re: How does cpu_idle() work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

P.F. Tsai wrote:

I am wondering about what happens after the "hlt" instruction being
executed, do all registers still keep their values ? does program counter
stopped too ? or the power was shut just like I turn it off ? is there
anything running stealthily ?

As Rik explained, the CPU doesn't do anything while executing the «hlt» instruction. It stops processing other instructions, until an interrupt wakes the CPU up.


Have a look at page 378 of ftp://download.intel.com/design/Pentium4/manuals/25366614.pdf, it explains exactly what the «hlt» instruction does.

the other question is, what is __builtin_constant_p()  called by test_bit()?
I can't even find it in the kernel codes.

__builtin_* functions are builtin functions (as their name stands) provided directly by the Gcc compiler. Have a look at http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Other-Builtins.html for more informations.


Last thing, do not top post please.

Sincerly,

Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux