Analysis of free_irq and apifree_irq For APIs interrupted by mobile development

Source: Internet
Author: User

Analysis of free_irq and apifree_irq For APIs interrupted by mobile development

Const void * free_irq (unsigned int irq, void * dev_id) is used to release a previously interrupted request by request_irq. static intel3_close (struct net_device * dev) {int ioaddr = dev-> base_addr; struct el3_private * lp = netdev_priv (dev); if (el3_debug> 2) pr_debug ("% s: shutting down ethercard. \ n ", dev-> name); el3_down (dev); free_irq (dev-> irq, dev);} under normal circumstances, free_irq is generally used as a cleaning function or an exception case. the source code analysis is as follows: const void * free_irq (unsigned int irq, void * dev_id) {# through ir Q_to_desc get the Interrupt Descriptor struct irq_desc * desc = irq_to_desc (irq); struct irqaction * action; const char * devname; # if the Interrupt Descriptor is null or the member variable status_use_accessors of the Interrupt Descriptor contains _ IRQ_PER_CPU_DEVID; then exit} if (! Desc | WARN_ON (irq_settings_is_per_cpu_devid (desc) return NULL; # ifdef CONFIG_SMPif (WARN_ON (desc-> affinity_policy) desc-> affinity_policy = NULL; # endif # action = _ free_irq (irq, dev_id); # exit if (! Action) return NULL; # obtain the namedevname = action-> name; # Release the space occupied by the interrupt handler and return devnamekfree (action); return devname ;}

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.