Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Delayed call to interrupt handler, why ???

Status
Not open for further replies.

adithyapwav

Newbie level 1
Joined
Jun 28, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Hyderabad
Activity points
1,291
This is my code for interrupt handler:

void abc(unsigned long args)
{
printk("Handler at:%ld", jiffies);
if(i>30)
wake_up_interruptible(&waitqueue);
else
add_timer(&timer_handler);
}

....
init_timer(&timer_handler);
timer_handler.expires=1;
timer_handler.function=abc;
add_timer(&timer_handler);
interruptible_sleep_on(&waitqueue);
......

The problem is that,my timer should expire after every 1 jiffy and handler should be called immediately. But though the timer expires and interrupt is recorded, my handler is not always called immediately. Output:

Handler at : 4913704
Handler at : 4913705
Handler at : 4913709
Handler at : 4913709
Handler at : 4913709
Handler at : 4913709
Handler at : 4913710
Handler at : 4913711

So, The jiffy at 4913706,7,8 and 9 are all handled at 4913709. How can i eliminate this. I want handler called for every jiffy?

Help me plz ...
Thanks in advance
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top