U return 1 dont return 0. If u return 1 OS thinks that ur interrupt was handled. And if u return 0 OS thinks the interrupt is not handled and searches for suitable handler. But it fails and crashes.
Regards Venkat --- ¸Î¤å <[EMAIL PROTECTED]> wrote: > Hi, > > I got a problem with the rtl_hard_enable_irq > function. > When i put the function in a rtl interrupt > handler like this... > > > unsigned int int_handler(unsigned int irq, struct > pt_regs *regs) > { > long long t; > t = lrdtsc(); > switch (irq) { > case IRQ1 : > rtl_hard_enable_irq(IRQ1); > rtf_put(0, &t, sizeof(t)); > break; > case IRQ2 : > rtl_hard_enable_irq(IRQ2); > rtf_put(1, &t, sizeof(t)); > break; > > > default : > break; > } > return 0; > } > > when there's an interrupt occur(IRQ1=4 , IRQ2=3 > ), my system will > crash seriously. But if i don't use the > function. rtlinux will not receive > anymore interrupt(IRQ1 and IRQ2) before > rtl_global_pend_irq(). > > I searched some others' codes, all of them put > the rtl_hard_enable_irq > in their interrupt handler. So i can not > understand why my system crashed. > Does anyone have the answer ? > > enviroment: redhat 7.0 > kernel2.2.19-rtl > rtlinux-3.1 > NIC Card IRQ : 4 and 3 > > > __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/