example of an C task switch within a timer handler?
example of an C task switch within a timer handler?
I search for an example of a C/inline asm task switch within a timer handler. Is there a good example (not JM's tut, that's not useful in a timer handler as far as I see).
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
Re: example of an C task switch within a timer handler?
I think it can be used in a timer handler, provided you take care of the interrupt status (possibly the flag) before and after switching. This depends on the code. All you need to do is call the code in the timer.
The timer interrupt basically comes in when the currently running task is interrupted. So when you switch to another task and then come back, it will resume in the timer interrupt and then return to the actual task. So the functionality IMHO remains the same.
The timer interrupt basically comes in when the currently running task is interrupted. So when you switch to another task and then come back, it will resume in the timer interrupt and then return to the actual task. So the functionality IMHO remains the same.