All of lore.kernel.org
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Confused by function names cpuidle_install_idle_handler/cpuidle_uninstall_idle_handler
Date: Tue, 22 Jul 2014 17:54:19 +0700	[thread overview]
Message-ID: <CAGdaadadYWRdUi5pwVUnrGZjWv-DxY8GF6fSFmGQmO_S1rH6HQ@mail.gmail.com> (raw)
In-Reply-To: <CAHu9=sP0B0OKq3QFC=WeagJJSEwJdpSsTYdytag=WNTbyHmGPg@mail.gmail.com>

On Fri, Jul 18, 2014 at 11:07 PM, Mohammad Merajul Islam Molla
<meraj.enigma@gmail.com> wrote:
> 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;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pm_idle is the callback handler, and it is assigned to
cpuidle_idle_call. I think this what it means by "install"


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

  reply	other threads:[~2014-07-22 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGdaadadYWRdUi5pwVUnrGZjWv-DxY8GF6fSFmGQmO_S1rH6HQ@mail.gmail.com \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.