_ISR_Handler

Joel Sherrill joel.sherrill at OARcorp.com
Mon Feb 25 16:23:35 UTC 2008


Allan Hessenflow wrote:
> As part of doing a bf537 bsp, I've written a new blackfin interrupt handler.
> It seems to work.  However, I see at least one problem with the _ISR_Handler
> documentation at:
> http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.8.0/share/rtems/html/porting/porting00035.html
>
> So, I'm hoping someone who understands the RTEMS interrupt handling better
> than I could take a look to see if the rest is okay, so I can try to get
> it right before submitting any code.
>
> The problem I'm fairly certain is present in that example is that it
> never decrements _Thread_Dispatch_disable_level.
>   
I tried to read this assembly to help you out but bfin
assembly is a bit cryptic to me.

It looks like it does the decrement it in the inner C routine.  If
_Thread_Dispatch_disable_level never got decremented
back to 0, then nothing would work after the first RTEMS
ISR.  So I have trouble believing it isn't doing very close
to the right thing.  

For all ISRs, the dispatch disable level should be non-zero.
On the outermost ISR, if it goes to 0 and Context switch
necessary or ISR signals to current thread, then you have
to do an "ISR Dispatch" which makes it look like the
currently executing thread did an asynchronous call
to _Thread_Dispatch.
> What I'd like verified is the handling of _ISR_Signals_to_thread_executing;
> should it in fact be cleared in every case except for nested ISRs?
>
>   
When the documentation is not clear, I always refer to the m68k
port on these things.  It is the easiest to read IMO.   It clears
the _ISR_Signals_to_thread_executing only if it is needed.  The
SPARC is also fairly easy to read and it does the same thing.

sp38 on the CVS head is a test of sending a signal from
an ISR.

--joel
> allan
>
> --
> Allan N. Hessenflow      allanh at kallisti.com
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list