linux Öжϴ¦Àí
Öжϴ¦Àí
ÔÚ 2.4 ÄÚºËºÍ 2.6ÄÚºËÖж¼Ê¹Óà request_irq()
º¯ÊýÀ´×¢²áÖжϷþÎñº¯Êý¡£ÔÚ 2.4
ÄÚºËÖУ¬ÐèÒª°üº¬µÄÍ·ÎļþÊÇ #include <linux/sched.h> £¬2.6 ÄÚºËÖÐÐèÒª°üº¬µÄÍ·ÎļþÔòÊÇ #include
<linux/interrupt.h> ¡£º¯ÊýÔÐÍÈçÏ£º
2.4 ÄÚºË
int
request_irq
(unsigned
int
irq
,
void
(*
handler
)(int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
frags
,
const
char
*
device
,
void
*
dev_id
);
2.6 ÄÚºË
request_irq
(unsigned
int
irq
,
irq_handler_t
handler
,
unsigned
long
flags
,
const
char
*
name
,
void
*
dev
);
ÔÚ·¢Éú¶ÔÓ¦
ÓÚµÚ 1¸ö²ÎÊý irq
µÄÖжÏʱ£¬Ôòµ÷ÓÃµÚ 2 ¸ö²ÎÊý handler
Ö¸¶¨µÄÖжϷþÎñº¯Êý(Ò²¾ÍÊÇ°Ñ handler() ÖжϷþÎñº¯Êý×¢²áµ½ÄÚºËÖÐ )¡£
µÚ 3 ¸ö²ÎÊý flags
Ö¸¶¨ÁË¿ìËÙÖжϻòÖжϹ²ÏíµÈÖжϴ¦ÀíÊôÐÔ¡£ÔÚ 2.6 ½ÌеÄÄÚºËÀï(ÎÒµÄÊÇ 2.6.27 ~ 2.6.31 )£¬ÔÚ
linux/interrupt.h Öж¨Òå²Ù×÷Õâ¸ö²ÎÊýµÄºêÈçÏ£º
/*
* These flags used only by the kernel as
part of the
*
irq handling routines.
*
*
IRQF_DISABLED - keep irqs disabled when calling the action handler
* IRQF_SAMPLE_RANDOM - irq is used to
feed the random generator
* IRQF_SHARED - allow sharing the irq among several devices
* IRQF_PROBE_SHARED - set by callers
when they expect sharing mismatches to occur
* IRQF_TIMER - Flag to mark this
interrupt as timer interrupt
* IRQF_PERCPU - Interrupt is per cpu
* IRQF_NOBALANCING - Flag to exclude
this interrupt from irq balancing
* IRQF_IRQPOLL - Interrupt is used for polling (only
the interrupt that is
* registered first in an shared interrupt is
considered for
*
performance reasons)
*/
#define
IRQF_DISABLED 0x00000020
#define IRQF_SAMPLE_RANDOM 0x00000040
#define IRQF_SHARED&
Ïà¹ØÎĵµ£º
´´½¨×ÀÃæÍ¼±ê
Ŀǰ½«ÍøÂçÓ¦ÓÃÀ©Õ¹µ½×ÀÃæÊÇÒ»¸öÇ÷ÊÆ£¬´æÔÚןܶà½â¾ö·½°¸£¬±¾ÎÄÒÔ Mozilla Prism ΪÀý£¬ÀàËÆµÄ·½·¨Í¬ÑùÊÊÓÃÓÚ Google Chrome ¡£
1. µ½ Mozilla Prism µÄÍøÕ¾ÉÏÏÂÔØ Prism£¬µã»÷ Download Now Ö®ºó»áÌáʾÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÒÔ Mozilla Firefox À©Õ¹µÄ·½Ê½£¬ÊʺÏÒѾ°²×°ÓÐ Firefox µÄÅóÓÑ£»Ò»Ö ......
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
ÔÛ¾Í˵˵linuxÔõôһ²½µ½Î»ÉèÖÃϵͳʱ¼ä¡£ÄÃlinuxÐéÄâ»ú×öʵÑéµÄÅóÓÑ»áÖªµÀ¡£µ±Äã°Ñlinux»¹Ôµ½Ä³¸öµãµÄʱºò£¬vmware°ï²»ÁËÄã°Ñϵͳʱ¼äÒ²¸øÖØÉèÁË¡£ËùÒÔÕâʱºò¾ÍÒªÊÖ¹¤À´¸ã¡£¹ØÓÚÕ¦Éèlinuxʱ¼ä¡£ÍøÉϽéÉÜÒ²ºÜ¶à£¬µ«ÊǶ¼ÊdzÀ´³È¥µÄ¶«Î÷¡£ÄÇÔõô²ÅÄܸßЧ¿ì½ÝµÄÉèÖÃϵͳʱ¼äÄØ£¿
&nb ......
usb_hcd_omap_probe (const struct hc_driver *driver) (dev/ohci/ohci-omap.c)
ÔÚÄ£¿é³õʼ»¯Ê±±»platform_driver_register()µ÷Óã¬ÓÃÀ´³õʼ»¯Óëohci_hcd_omap_driver
ÏàÆ¥ÅäµÄusbÖ÷¿ØÖÆÆ÷.
->usb_create_hcd(driver); ´´½¨Ò»¸ö´ú±íhost-controllerµÄÊý¾Ý½á¹¹(struct usb_hcd)²¢³õʼ»¯ core/hcd.h
->hcd = kz ......
Linux³ÌÐò²ÎÊý°üÀ¨Á½²¿·Ö£º ÃüÁîÐвÎÊýºÍ»·¾³±äÁ¿
ÃüÁîÐвÎÊý´«µÝ¸ømianº¯Êý int mian (int argc,char *argv[])
»·¾³±äÁ¿ extern char *environ[]
»ñµÃ»·¾³±äÁ¿µÄº¯Êý£º const char* getenv(const char* name)
ÉèÖû·¾³±äÁ¿µÄº¯Êý£º
£¨1£©int putent (const c ......