[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Which stack does the timer service routine use?
- Date: Fri, 28 May 1999 12:05:42 -0500 (CDT)
- From: joel at OARcorp.com (joel at OARcorp.com)
- Subject: Which stack does the timer service routine use?
On Fri, 28 May 1999, Jiri Gaisler wrote:
> joel at oarcorp.com wrote:
> > On Fri, 28 May 1999, Eric Norum wrote:
> > > joel at oarcorp.com wrote:
> > > >
> > > > On Fri, 28 May 1999, Jiri Gaisler wrote:
> > > >
> > > > > Does anyone know which stack a timer service routine work on? Is
> > > > > it the interrupt stack, the task stack of the task that created
> > > > > the timer, or the task stack of the task that was interrupted by
> > > > > the timer interrupt? We're having some problems with stack overflow
> > > > > during timer handling but I don't know which stack to increase.
> > > > >
> > > >
> > > > Timer service routines are invoked during the clock_tick
> > > > directive and thus run on the Interrupt stack.
> Does the timer service routine execute at the interrupt level of the
> timer interrupt then? And what about calling rtems directives from
> the timer service routines - the documents say that from an interrupt
> service routine, you can only call certain rtems directives. For
> timer service routines, it is mentioned that any directive is possible.
> Is this true?
Yes it is. You should only all non-blocking directives from a TSR.
Our thinking was that even if these ran from a timer service task, they
should not block because that would mess up all notion of timers firing
when they were expected.
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985