There are at least two attributes to func declaration  - "reentrant" and 
"critical" (defined in iomacros.h)

First one disables interrupts on funct entry and enables on exit.
Another one saves r2, disables ints on exit and restores its state on exit.
Read docs (which are in libc/doc) for more info.

~d

P.S. dint/eint is not a proper (but possible) workaround




On Friday 04 October 2002 17:10, Shehata, Karim wrote:
> Hello everyone!
>
> In IAR's icc430 compiler, there's a keyword "monitor" that can be used when
> declaring a function to disable all interrupts during it's execution.  Does
> mspgcc have anything similar?  I suppose a work-around would be to just put
> dint() and eint() at the beginning and end of each monitor function, but
> that's a bit of a hassle when trying to port larger sets of code.
>
> For anyone interested, I'm porting over some code that my company has
> developed using Embedded Workbench 2.31E using the windows binaries from
> mikrocontroller.net date 10-02-2002 (Thanks Andreas!).  So far, I've gotten
> everything to compile with some minor changes (ISR declarations, monitor,
> printf), and even tested out some of the functionality on our prototype
> device using C-SPY.
>
> Cheers!
>
>
> /***************************************
>  * Karim Shehata                       *
>  * [email protected]   *
>  * Research and Development Engineer   *
>  * Messier-Dowty Toronto               *
>  ***************************************/
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users



Reply via email to