This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
ISR Vs DSR
- From: ecosrtos ecosrtos <ecosrtos at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 13 Jan 2005 13:55:33 -0800
- Subject: [ECOS] ISR Vs DSR
- Reply-to: ecosrtos ecosrtos <ecosrtos at gmail dot com>
Reference to Page 47 Step 9 ECOS book by Massa book
http://www.informit.com/content/downloads/perens/0130354732.pdf
If scheduler lock variable is 0 then the DSR executes else the thread
that locked the scheduler variable executes, therby delaying the DSR.
In my application I want to timestamp when the interrupt occurs (using
cyg_current_time() and HAL_CLOCK_READ()) accurately right after the
interrupt occurs and these functions are called in the DSR of the
interrupt.
Now if the DSR is delayed because some other thread starts running
then I will get a wrong reading of the time. An option is to transfer
the timestamping code into the ISR. However this goes against the
'conventional' philosophy that ISR should do as little as possible.
Question) Is there a better way to solve this issue that putting
timestamping code into ISR?
Note timestamping code is really just 3 â 4 lines of code. Is it just
OK to leave it in the ISR?
thanks
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss