All of lore.kernel.org
 help / color / mirror / Atom feed
From: lovelylich@gmail.com (Yi Li)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How to diasble interrupt of current core in multicore cpu
Date: Fri, 6 Jun 2014 03:05:31 +0800	[thread overview]
Message-ID: <066501cf80f1$22bdc710$68395530$@gmail.com> (raw)
In-Reply-To: <CA+aCy1FtqcgsHdRQPkABH9QLoqo9M=4b1Ch+AQ007GA7+tyaVA@mail.gmail.com>



-----Original Message-----
From: kernelnewbies-bounces@kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Pranay Srivastava
Sent: Friday, May 30, 2014 4:26 PM
To: J.Hwan Kim
Cc: kernelnewbies
Subject: Re: How to diasble interrupt of current core in multicore cpu

are you looking for

local_irq_disable?

On Fri, May 30, 2014 at 1:42 PM, J.Hwan Kim <kernel.frog.007@gmail.com> wrote:
> Hi, everyone
>
> How to disable interrupt for current core in multicore CPU?
>
> Thanks in advance
> Kim.
>
local_irq_save/restore would be more suitable. you can use them without considering
is interrupt enabled now. your code may looks like this:
local_irq_save()
/*your code comes here with interrupt disabled*/
local_irq_restore()
in this way, if interrupt is in state A (may be enabled or disabled), before you call local_irq_save(), then after you call local_irq_restore,
the interrupt will still be in state A. harmless to other code.
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
        ---P.K.S

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      parent reply	other threads:[~2014-06-05 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30  8:12 How to diasble interrupt of current core in multicore cpu J.Hwan Kim
2014-05-30  8:25 ` Pranay Srivastava
2014-05-30  8:29   ` enjoy mindful
2014-06-05 19:05   ` Yi Li [this message]

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='066501cf80f1$22bdc710$68395530$@gmail.com' \
    --to=lovelylich@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.