Disabling interrupts and masking interrupts

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

 



Hello,
what is the difference between disabling interrupts and masking
interrupts ?  Disabling interrupts is done, AFAIK, with irq_disable().
(see below)
Can someone gives an example of how to mask interrupts
with x86/x86_64 ?

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


[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