Re: Disabling interrupts and masking interrupts

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

 



Hi.
First: Thanks, Anish, for your quick response.

Does this mean that once you are disabling
interrupts, these interrupts are lost ?  even later, when we will
enable interrupts, the interrupts from the past that should have been
created (but interrupts were disabled at that time interval) are in
fact lost?

And once you mask interrupts, these interrupts
are not lost, but these masked interrupts will be handled later when
the interrupt is unmasked ?

Did I understand correctly ?
rgs
Kevin

On Thu, Mar 7, 2013 at 5:00 PM, anish singh <anish198519851985@xxxxxxxxx> wrote:
> On Thu, Mar 7, 2013 at 7:28 PM, Kevin Wilson <wkevils@xxxxxxxxx> wrote:
>> Hello,
>> what is the difference between disabling interrupts and masking
>> interrupts ?  Disabling interrupts is done, AFAIK, with irq_disable().
> Disabling interrupts means that you have disabled the source of interrupt.
> Masking means that you are not(CPU) going to handle the interrupts until it is
> unmasked.
>> (see below)
>> Can someone gives an example of how to mask interrupts
>> with x86/x86_64 ?
> Not familiar with x86. Try asking in kernel mailing list.I guess you
> will get more help there.
>>
>> irq_disable() in x86 goes to native_irq_disable(), which
>> eventually calls assembler "cli" command:
>>
>> CLI clears the IF bit in the flags.
>>
>>
>> static inline void native_irq_disable(void)
>> {
>>         asm volatile("cli": : :"memory");
>> }
>> see arch/x86/include/asm/irqflags.h
>>
>> rgs,
>> Kevin
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies@xxxxxxxxxxxxxxxxx
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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


[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