Edge triggering and level triggering of Linux interruptions

Source: Internet
Author: User

* Handle_edge_irq-edge type IRQ handler
* @ Irq: the interrupt number
* @ Desc: the interrupt description structure for this irq
*
* Interrupt occures on the falling and/or rising edge of a hardware
* Signal. The occurence is latched into the irq controller hardware
* And must be acked in order to be reenabled. After the ack another
* Interrupt can happen on the same source even before the first one
* Is handled by the assosiacted event handler. If this happens it
* Might be necessary to disable (mask) the interrupt depending on
* Controller hardware. This requires to reenable the interrupt inside
* Of the loop which handles the interrupts which have arrived while
* The handler was running. If all pending interrupts are handled,
* Loop is left.
*/

* Handle_level_irq-Level type irq handler
* @ Irq: the interrupt number
* @ Desc: the interrupt description structure for this irq
*
* Level type interrupts are active as long as the hardware line has
* The active level. This may require to mask the interrupt and unmask
* It after the associated handler has acknowledged the device, so
* Interrupt line is back to inactive.
*/

//

Handle_level_irqirqreturn_t action_ret
Spin_lockMask_ack_irq
Desckstat_incr_irqs_this_cpu
* If its disabled or no action available
* Keep it masked and get out of here
*/
Action
Descspin_unlock
Action_ret note_interrupt
Spin_lockdesc
Descdescout_unlockspin_unlockEXPORT_SYMBOL_GPL
Handle_edge_irqspin_lock
Desc
* If we're currently running this IRQ, or its disabled,
* We shouldn't process the IRQ. Mark it pending, handle
* The necessary masking and go out
*/
Descmask_ack_irqkstat_incr_irqs_this_cpu
Desc
Desc
Irqreturn_t action_ret
Desc
* When another irq arrived while we were handling
* One, we cocould have masked the irq.
* Renable it, if it was not disabled in meantime.
*/
Descdesc
Descspin_unlockaction_ret note_interruptspin_lock

Descout_unlockspin_unlock

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.