Signal handler & mutex, condition
osv at javad.com
Wed Jun 28 10:32:21 UTC 2006
"Marek Prochazka" <Marek.Prochazka at scisys.co.uk> writes:
>>>I also assume that the timer implementation uses asynchronous signal
>>>routines (ASRs). The RTEMS manual however says that "ASRs execute in
>>>context of a task and may execute any directive."
>> You would have assumed badly especially since you could have read
>> the source code.
>> Regular TSRs are invoked as part of processing the clock tick
>> interrupt handler and thus execute outside the context of any
> thanks for the reply - I haven't have time to investigate more and
> look into the source code. The documentation is somewhat unclear in
> this respect.
>>>My interpretation of this is that I do not have to worry about the
>>>of mutexes and conditions in a timer service routine (and hence a
>>>timer callback). Any thoughts on this, please?
>> You do have to worry about them -- you can't block at all during a
> O.K., but the problem is that RTEMS doesn't implement the SIGEV_THREAD
> way of implementation (as far as I know), so it is hard to use timers
> for many types of applications as the execution environment for signal
> handlers is too restrictive.
Nothing prevents you from starting your own thread(s) waiting for
event(s) from timer(s) and then doing whatever you wish in thread
context, and it's not that hard I believe.
More information about the users