-----Original Message-----
From: [email protected] 
[mailto:[email protected]] 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 <[email protected]> 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
> [email protected]
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
        ---P.K.S

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to