All of lore.kernel.org
 help / color / mirror / Atom feed
* Confused by function names cpuidle_install_idle_handler/cpuidle_uninstall_idle_handler
@ 2014-07-18 16:07 Mohammad Merajul Islam Molla
  2014-07-22 10:54 ` Mulyadi Santosa
  0 siblings, 1 reply; 6+ messages in thread
From: Mohammad Merajul Islam Molla @ 2014-07-18 16:07 UTC (permalink / raw)
  To: kernelnewbies

Hello,

In drivers/cpuidle/cpuidle.c, there are two functions
cpuidle_install_idle_handler & cpuidle_uninstall_idle_handler. The
names seem confusing to me as they don't install any handler, rather
set 'initialized'  variable to 1/0.

In v3.0 kernel, these functions used to look as below where they
installed and uninstalled some handler function  -

void cpuidle_install_idle_handler(void)
123 {
124         if (enabled_devices && (pm_idle != cpuidle_idle_call)) {
125                 /* Make sure all changes finished before we switch
to new idle */
126                 smp_wmb();
127                 pm_idle = cpuidle_idle_call;
128         }
129 }

void cpuidle_uninstall_idle_handler(void)
135 {
136         if (enabled_devices && pm_idle_old && (pm_idle != pm_idle_old)) {
137                 pm_idle = pm_idle_old;
138                 cpuidle_kick_cpus();
139         }
140 }

Do these names (and corresponding comments) still hold?

--
Thanks,
-Meraj

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-22 15:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 16:07 Confused by function names cpuidle_install_idle_handler/cpuidle_uninstall_idle_handler Mohammad Merajul Islam Molla
2014-07-22 10:54 ` Mulyadi Santosa
2014-07-22 13:56   ` Mohammad Merajul Islam Molla
2014-07-22 14:43     ` Anand Moon
2014-07-22 15:07       ` Mohammad Merajul Islam Molla
2014-07-22 15:43         ` Anand Moon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.