This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ISR Vs DSR


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]